Closed ghost closed 5 months ago
Попробуй использовать инклуды из SA-MP, а не из open.mp. А на положение текста эта функция никак не влияет.
Не понял совсем) Какие именно инклуды?
Те, что находятся в папке pawno\include
, ты поставил от open.mp, поставь от SA-MP.
Всё равно
Проще сейчас вам тестить и уже отписать потом.
Я тестировал в 2016, с тех пор ничего не поменялось кроме того, что я уже написал. Так что сделай то, что я написал, за тебя это никто делать не будет.
Ну так если использовать инклуды SAMP, то как людям играть на опен.мп? Или это ничего не будет?
open.mp нормально работает как со своими так и с SA-MP инклудами.
я поставил инклуды от SA-MP, все равно та же
Скрипт перекомпилировал с ними? Я проверил, всё работает нормально.
да, перекомпилировал
И что на этом скриншоте не так?
Английский язык не совмещают с плагином rustext?
Дело в том что я делаю проект для русских и англичанов. Тут текстдравы багаются.
Не понял, что багается? Если что, этот плагин не переводит английский текст на русский.
да я знаю что плагин не переводит англ яз на русский
сейчас тебе скину скрин и поймешь все
до заливки плагина
после заливки плагина
Дак код этого текстдрава то скинь
ShowPlayerBox(playerid, type, text[], time = 0)
{
KillTimer(g_boxTimer[playerid]);
switch(type)
{
case 1:
{
PlayerTextDrawSetString(playerid, ui_box[playerid], text);
PlayerTextDrawShow(playerid, ui_box[playerid]);
}
case 2:
{
PlayerTextDrawSetString(playerid, ui_text[playerid], text);
PlayerTextDrawShow(playerid, ui_text[playerid]);
}
}
if(time > 0) g_boxTimer[playerid] = SetTimerEx("HidePlayerBox", time, false, "i", playerid);
return 1;
}
ui_text[playerid] = CreatePlayerTextDraw(playerid, 330.000000, 385.000000, "");
PlayerTextDrawLetterSize(playerid, ui_text[playerid], 0.250000, 1.000000);
PlayerTextDrawTextSize(playerid, ui_text[playerid], 0.000000, 500.000000);
PlayerTextDrawAlignment(playerid, ui_text[playerid], 2);
PlayerTextDrawColor(playerid, ui_text[playerid], 0xFFFFFFFF);
PlayerTextDrawUseBox(playerid, ui_text[playerid], 0);
PlayerTextDrawBoxColor(playerid, ui_text[playerid], 0x80808080);
PlayerTextDrawSetShadow(playerid, ui_text[playerid], 0);
PlayerTextDrawSetOutline(playerid, ui_text[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, ui_text[playerid], 0x000000FF);
PlayerTextDrawFont(playerid, ui_text[playerid], 1);
PlayerTextDrawSetProportional(playerid, ui_text[playerid], 1);
PlayerTextDrawSetSelectable(playerid, ui_text[playerid], 0);
ui_box[playerid] = CreatePlayerTextDraw(playerid, 15.000000, 200.000000, "");
PlayerTextDrawLetterSize(playerid, ui_box[playerid], 0.380000, 1.570000);
PlayerTextDrawTextSize(playerid, ui_box[playerid], 172.000000, -3.000000);
PlayerTextDrawAlignment(playerid, ui_box[playerid], 0);
PlayerTextDrawColor(playerid, ui_box[playerid], 0xCCCCCCFF);
PlayerTextDrawUseBox(playerid, ui_box[playerid], 1);
PlayerTextDrawBoxColor(playerid, ui_box[playerid], 0x000000AA);
PlayerTextDrawSetShadow(playerid, ui_box[playerid], 2);
PlayerTextDrawSetOutline(playerid, ui_box[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, ui_box[playerid], 0xFFFFFF00);
PlayerTextDrawFont(playerid, ui_box[playerid], 1);
PlayerTextDrawSetProportional(playerid, ui_box[playerid], 1);
PlayerTextDrawSetSelectable(playerid, ui_box[playerid], 0);
Вот что ты мне дал и оно так отображается вне зависимости от наличия плагина.
Короче, разбирайся сам.
непонятно что за это фигня, можешь закрыть, исправил бы свой плагин. спасибо за подсказку, ладно
Вот у меня так всё отображается с плагином и без:
Вот код:
#include <a_samp>
#include "rustext"
#include "zcmd"
new PlayerText:ui_text[MAX_PLAYERS];
new PlayerText:ui_box[MAX_PLAYERS];
stock CreateTD(playerid)
{
ui_text[playerid] = CreatePlayerTextDraw(playerid, 330.000000, 385.000000, "_");
PlayerTextDrawLetterSize(playerid, ui_text[playerid], 0.250000, 1.000000);
PlayerTextDrawTextSize(playerid, ui_text[playerid], 0.000000, 500.000000);
PlayerTextDrawAlignment(playerid, ui_text[playerid], 2);
PlayerTextDrawColor(playerid, ui_text[playerid], 0xFFFFFFFF);
PlayerTextDrawUseBox(playerid, ui_text[playerid], 0);
PlayerTextDrawBoxColor(playerid, ui_text[playerid], 0x80808080);
PlayerTextDrawSetShadow(playerid, ui_text[playerid], 0);
PlayerTextDrawSetOutline(playerid, ui_text[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, ui_text[playerid], 0x000000FF);
PlayerTextDrawFont(playerid, ui_text[playerid], 1);
PlayerTextDrawSetProportional(playerid, ui_text[playerid], 1);
PlayerTextDrawSetSelectable(playerid, ui_text[playerid], 0);
ui_box[playerid] = CreatePlayerTextDraw(playerid, 15.000000, 200.000000, "_");
PlayerTextDrawLetterSize(playerid, ui_box[playerid], 0.380000, 1.570000);
PlayerTextDrawTextSize(playerid, ui_box[playerid], 172.000000, -3.000000);
PlayerTextDrawAlignment(playerid, ui_box[playerid], 0);
PlayerTextDrawColor(playerid, ui_box[playerid], 0xCCCCCCFF);
PlayerTextDrawUseBox(playerid, ui_box[playerid], 1);
PlayerTextDrawBoxColor(playerid, ui_box[playerid], 0x000000AA);
PlayerTextDrawSetShadow(playerid, ui_box[playerid], 2);
PlayerTextDrawSetOutline(playerid, ui_box[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, ui_box[playerid], 0xFFFFFF00);
PlayerTextDrawFont(playerid, ui_box[playerid], 1);
PlayerTextDrawSetProportional(playerid, ui_box[playerid], 1);
PlayerTextDrawSetSelectable(playerid, ui_box[playerid], 0);
return 1;
}
public OnFilterScriptInit()
{
for (new i = 0; i < MAX_PLAYERS; i += 1) {
if (!IsPlayerConnected(i)) {
continue;
}
CreateTD(i);
}
return 1;
}
public OnFilterScriptExit()
{
for (new i = 0; i < MAX_PLAYERS; i += 1) {
if (!IsPlayerConnected(i)) {
continue;
}
PlayerTextDrawDestroy(i, ui_text[i]);
PlayerTextDrawDestroy(i, ui_box[i]);
}
return 1;
}
public OnPlayerSpawn(playerid)
{
CreateTD(playerid);
return 1;
}
CMD:show(playerid, params[])
{
PlayerTextDrawShow(playerid, ui_text[playerid]);
PlayerTextDrawShow(playerid, ui_box[playerid]);
return 1;
}
CMD:hide(playerid, params[])
{
PlayerTextDrawHide(playerid, ui_text[playerid]);
PlayerTextDrawHide(playerid, ui_box[playerid]);
return 1;
}
CMD:test(playerid, params[])
{
PlayerTextDrawSetString(playerid, ui_text[playerid], "Engine ~r~off~w~, press the N key to start the engine.");
PlayerTextDrawShow(playerid, ui_text[playerid]);
return 1;
}
CMD:test2(playerid, params[])
{
PlayerTextDrawSetString(playerid, ui_box[playerid], "Engine ~r~off~w~, press the N key to start the engine.");
PlayerTextDrawShow(playerid, ui_box[playerid]);
return 1;
}
Перенес спидометр, все та же ошибка дает
так же так стоит
то что ты мне кидал скрин и код, это потому что ты используешь SA-MP версию, а не омп. Ну типо у тебя на сервере стоит версия САМП, а не omp. Лучше качай omp-server.exe и компоненты и сам поймешь
то что ты мне кидал скрин и код, это потому что ты используешь SA-MP версию, а не омп. Ну типо у тебя на сервере стоит версия САМП, а не omp. Лучше качай omp-server.exe и компоненты и сам поймешь
Я проверял как в сампе, так и в опенмп, везде результат одинаковый.
что за фигня.... можешь вк скинуть свой?
Я не учитель программирования, с этими проблемами нужно обращаться куда-то в другое место.
привет, ты же недавно релизнул его под опен.мп, так вот, обнаружил еще один баг, он почему то ругается в конфиге xt: Incorrect parameter count for "PlayerTextDrawSetString", 3 != 4
[2024-05-01T15:42:22+0300] [Info] * rustext: Incorrect parameter count for "PlayerTextDrawSetString", 3 != 4
обрати внимание, текст в центре, а текст должен быть внизу.