Код:
CreateTextDraws(playerid)
{
TDEditor_PTD[playerid][0] = CreatePlayerTextDraw(playerid, 192.666778, 77.866661, "box");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][0], 0.000000, 25.100002);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][0], 475.000000, 0.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][0], -1);
PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][0], 0x171717AA);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][0], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][0], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][0], 0);
TDEditor_PTD[playerid][1] = CreatePlayerTextDraw(playerid, 272.000122, 83.807411, " Los_Santos_Realism");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][1], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][1], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][1], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][1], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][1], 0);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][1], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][1], 0);
TDEditor_PTD[playerid][2] = CreatePlayerTextDraw(playerid, 401.617187, 157.079666, "box");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][2], 0.000000, 12.809000);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][2], 462.500671, 0.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][2], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][2], -1);
PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][2], 1);
PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][2], 0x171717FF);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][2], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][2], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][2], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][2], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][2], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][2], 0);
PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][2], true);
TDEditor_PTD[playerid][3] = CreatePlayerTextDraw(playerid, 302.568298, 157.079666, "box");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][3], 0.000000, 12.809000);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][3], 363.451782, 0.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][3], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][3], -1);
PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][3], 1);
PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][3], 0x171717FF); // -1229539690
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][3], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][3], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][3], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][3], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][3], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][3], 0);
PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][3], true);
TDEditor_PTD[playerid][4] = CreatePlayerTextDraw(playerid, 202.719253, 157.079666, "box");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][4], 0.000000, 12.809000);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][4], 263.602966, 0.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][4], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][4], -1);
PlayerTextDrawUseBox(playerid, TDEditor_PTD[playerid][4], 1);
PlayerTextDrawBoxColor(playerid, TDEditor_PTD[playerid][4], 0x171717FF);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][4], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][4], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][4], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][4], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][4], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][4], 0);
PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][4], true);
TDEditor_PTD[playerid][5] = CreatePlayerTextDraw(playerid, 233.000259, 198.844406, "Empty_Slot");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][5], 0.358999, 1.836444);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][5], 2);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][5], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][5], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][5], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][5], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][5], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][5], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][5], 0);
//PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][5], true);
TDEditor_PTD[playerid][6] = CreatePlayerTextDraw(playerid, 332.767730, 200.918487, "Empty_Slot");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][6], 0.358999, 1.836444);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][6], 2);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][6], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][6], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][6], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][6], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][6], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][6], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][6], 0);
//PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][6], true);
TDEditor_PTD[playerid][7] = CreatePlayerTextDraw(playerid, 431.852752, 198.429595, "Empty_Slot");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][7], 0.358999, 1.836444);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][7], 2);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][7], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][7], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][7], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][7], 255);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][7], 1);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][7], 1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][7], 0);
//PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][7], true);
TDEditor_PTD[playerid][8] = CreatePlayerTextDraw(playerid, 188.036071, 165.785202, "");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][8], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][8], 90.000000, 90.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][8], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][8], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][8], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][8], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][8], 0);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][8], 5);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][8], 0);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][8], 0);
PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][8], true);
PlayerTextDrawSetPreviewModel(playerid, TDEditor_PTD[playerid][8], 19300);
PlayerTextDrawSetPreviewRot(playerid, TDEditor_PTD[playerid][8], 0.000000, 0.000000, 0.000000, 1.000000);
TDEditor_PTD[playerid][9] = CreatePlayerTextDraw(playerid, 287.333343, 165.785202, "");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][9], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][9], 90.000000, 90.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][9], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][9], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][9], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][9], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][9], 0);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][9], 5);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][9], 0);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][9], 0);
PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][9], true);
PlayerTextDrawSetPreviewModel(playerid, TDEditor_PTD[playerid][9], 19300);
PlayerTextDrawSetPreviewRot(playerid, TDEditor_PTD[playerid][9], 0.000000, 0.000000, 0.000000, 1.000000);
TDEditor_PTD[playerid][10] = CreatePlayerTextDraw(playerid, 386.733551, 165.785202, "");
PlayerTextDrawLetterSize(playerid, TDEditor_PTD[playerid][10], 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, TDEditor_PTD[playerid][10], 90.000000, 90.000000);
PlayerTextDrawAlignment(playerid, TDEditor_PTD[playerid][10], 1);
PlayerTextDrawColor(playerid, TDEditor_PTD[playerid][10], -1);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][10], 0);
PlayerTextDrawSetOutline(playerid, TDEditor_PTD[playerid][10], 0);
PlayerTextDrawBackgroundColor(playerid, TDEditor_PTD[playerid][10], 0);
PlayerTextDrawFont(playerid, TDEditor_PTD[playerid][10], 5);
PlayerTextDrawSetProportional(playerid, TDEditor_PTD[playerid][10], 0);
PlayerTextDrawSetShadow(playerid, TDEditor_PTD[playerid][10], 0);
PlayerTextDrawSetSelectable(playerid, TDEditor_PTD[playerid][10], true);
PlayerTextDrawSetPreviewModel(playerid, TDEditor_PTD[playerid][10], 19300);
PlayerTextDrawSetPreviewRot(playerid, TDEditor_PTD[playerid][10], 0.000000, 0.000000, 0.000000, 1.000000);
ServerStatusTDE[playerid] = CreatePlayerTextDraw(playerid,637.000000, 438.000000, "Los Santos Realism - Version "VERName"");
PlayerTextDrawAlignment(playerid,ServerStatusTDE[playerid], 3);
PlayerTextDrawBackgroundColor(playerid,ServerStatusTDE[playerid], 255);
PlayerTextDrawFont(playerid,ServerStatusTDE[playerid], 1);
PlayerTextDrawLetterSize(playerid,ServerStatusTDE[playerid], 0.189999, 1.000000);
PlayerTextDrawColor(playerid,ServerStatusTDE[playerid], -1);
PlayerTextDrawSetOutline(playerid,ServerStatusTDE[playerid], 0);
PlayerTextDrawSetProportional(playerid,ServerStatusTDE[playerid], 1);
PlayerTextDrawSetShadow(playerid,ServerStatusTDE[playerid], 0);
PlayerTextDrawSetSelectable(playerid,ServerStatusTDE[playerid], 0);
ServerIntroMSG[playerid] = CreatePlayerTextDraw(playerid, 115.764739, 379.750030, "www.lsrealism.com forums.lsrealism.com");
PlayerTextDrawLetterSize(playerid, ServerIntroMSG[playerid], 0.430705, 1.518332);
PlayerTextDrawAlignment(playerid, ServerIntroMSG[playerid], 1);
PlayerTextDrawColor(playerid, ServerIntroMSG[playerid], 603324159);
PlayerTextDrawSetShadow(playerid, ServerIntroMSG[playerid], 1);
PlayerTextDrawSetOutline(playerid, ServerIntroMSG[playerid], 0);
PlayerTextDrawBackgroundColor(playerid, ServerIntroMSG[playerid], 51);
PlayerTextDrawFont(playerid, ServerIntroMSG[playerid], 3);
PlayerTextDrawSetProportional(playerid, ServerIntroMSG[playerid], 1);
return 1;
}
Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
new tdempty0, tdempty1, tdempty2;
tdempty0 = GetPVarInt(playerid, "tdempty0");
tdempty1 = GetPVarInt(playerid, "tdempty1");
tdempty2 = GetPVarInt(playerid, "tdempty2");
print("clicky");
if(_:playertextid != INVALID_TEXT_DRAW)
{
if(playertextid == TDEditor_PTD[playerid][2])
{
if(tdempty0 == 0)
{
chooseCharacter(playerid, 0);
}
else
{
showCharacterCreationDialog(playerid);
}
}
else if(playertextid == TDEditor_PTD[playerid][5])
{
if(tdempty0 == 0)
{
chooseCharacter(playerid, 0);
}
else
{
showCharacterCreationDialog(playerid);
}
}
else if(playertextid == TDEditor_PTD[playerid][8])
{
if(tdempty0 == 0)
{
chooseCharacter(playerid, 0);
}
else
{
showCharacterCreationDialog(playerid);
}
}
else if(playertextid == TDEditor_PTD[playerid][3])
{
if(tdempty1 == 0)
{
chooseCharacter(playerid, 1);
}
else
{
showCharacterCreationDialog(playerid);
}
}
else if(playertextid == TDEditor_PTD[playerid][6])
{
if(tdempty1 == 0)
{
chooseCharacter(playerid, 1);
}
else
{
showCharacterCreationDialog(playerid);
}
}
else if(playertextid == TDEditor_PTD[playerid][9])
{
if(tdempty1 == 0)
{
chooseCharacter(playerid, 1);
}
else
{
showCharacterCreationDialog(playerid);
}
}
else if(playertextid == TDEditor_PTD[playerid][4])
{
if(tdempty2 == 0)
{
chooseCharacter(playerid, 2);
}
else
{
showCharacterCreationDialog(playerid);
}
}
else if(playertextid == TDEditor_PTD[playerid][8])
{
if(tdempty2 == 0)
{
chooseCharacter(playerid, 2);
}
else
{
showCharacterCreationDialog(playerid);
}
}
else if(playertextid == TDEditor_PTD[playerid][10])
{
if(tdempty2 == 0)
{
chooseCharacter(playerid, 2);
}
else
{
showCharacterCreationDialog(playerid);
}
}
SetPVarInt(playerid, "TextDrawOpen", 0);
CancelSelectTextDraw(playerid);
PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][0]);
PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][1]);
PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][2]);
PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][3]);
PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][4]);
PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][5]);
PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][6]);
PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][7]);
PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][8]);
PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][9]);
PlayerTextDrawHide(playerid, TDEditor_PTD[playerid][10]);
PlayerTextDrawHide(playerid, ServerStatusTDE[playerid]);
CancelSelectTextDraw(playerid);
}
if(_:playertextid != INVALID_TEXT_DRAW)
{
if(playertextid == ImportantMsg[playerid])
{
new msg[128];
if(ServerStatus == 3)
{
new month[32];
if(ScheduledMonth == 1) format(month, sizeof(month), "January");
else if(ScheduledMonth == 2) format(month, sizeof(month), "February");
else if(ScheduledMonth == 3) format(month, sizeof(month), "March");
else if(ScheduledMonth == 4) format(month, sizeof(month), "April");
else if(ScheduledMonth == 5) format(month, sizeof(month), "May");
else if(ScheduledMonth == 6) format(month, sizeof(month), "June");
else if(ScheduledMonth == 7) format(month, sizeof(month), "July");
else if(ScheduledMonth == 8) format(month, sizeof(month), "August");
else if(ScheduledMonth == 9) format(month, sizeof(month), "September");
else if(ScheduledMonth == 10) format(month, sizeof(month), "October");
else if(ScheduledMonth == 11) format(month, sizeof(month), "November");
else if(ScheduledMonth == 12) format(month, sizeof(month), "December");
format(msg, 128, "- There is scheduled maintenance due on %d of %s, %d:%d.", ScheduledDay, month, ScheduledHour, ScheduledMinute);
SendClientMessage(playerid, COLOR_GREY,msg);
}
if(GetPVarInt(playerid, "UnreadPlayerNotes") != 0)
{
format(msg, 128, "- You have %s unread notes (/read)", GetPVarInt(playerid, "UnreadPlayerNotes"));
SendClientMessage(playerid, COLOR_GREY,msg);
}
CancelSelectTextDraw(playerid);
PlayerTextDrawHide(playerid, ImportantMsg[playerid]);
}
}
if(_:playertextid != INVALID_TEXT_DRAW)
{
if(playertextid == Dashboard_TDE[playerid][10] || playertextid == Dashboard_TDE[playerid][11])
{
for(new i=0;i<33;i++)
{
PlayerTextDrawHide(playerid, Dashboard_TDE[playerid][i]);
}
SetPVarInt(playerid, "TextDrawOpen", 1);
LookUpLoad(playerid);
}
else if(playertextid == LookUpTDE[playerid][9])
{
for(new i=0;i<41;i++)
{
PlayerTextDrawHide(playerid, LookUpTDE[playerid][i]);
}
SetPVarInt(playerid, "TextDrawOpen", 1);
LoadDashBoard(playerid);
}
else if(playertextid == LookUpTDE[playerid][3])
{
for(new i=0;i<41;i++)
{
PlayerTextDrawHide(playerid, LookUpTDE[playerid][i]);
}
}
else if(playertextid == Dashboard_TDE[playerid][3])
{
for(new i=0;i<33;i++)
{
PlayerTextDrawHide(playerid, Dashboard_TDE[playerid][i]);
}
}
}
return 1;
}
This is where it gets strange, when I am using ZCMD the textdraw is selectable and works perfect. However if I use y_commands it isnt.
I'd say you should start with checking if you have the latest version of YSI / y_commands, and that the files are not corrupted.
Still having this issue if anyone has any idea it would help. Updating main post with more code.
YSI is a no-no in my book, use ZCMD or any other decent command processor (iZCMD, PawnCMD, whatever).