#1

Hi,

When i click on these texdraws there in no reaction

Код:
TDGrupa1[playerid][8] = CreatePlayerTextDraw(playerid, 567.049987, 311.325012, "LD_OTB2:Ric1");PlayerTextDrawLetterSize(playerid, TDGrupa1[playerid][8], 0.000000, 0.000000);PlayerTextDrawTextSize(playerid, TDGrupa1[playerid][8], 23.000000, 19.687500);PlayerTextDrawAlignment(playerid, TDGrupa1[playerid][8], 1);PlayerTextDrawColor(playerid, TDGrupa1[playerid][8], -1);PlayerTextDrawSetShadow(playerid, TDGrupa1[playerid][8], 0);PlayerTextDrawSetOutline(playerid, TDGrupa1[playerid][8], 0);PlayerTextDrawFont(playerid, TDGrupa1[playerid][8], 4);PlayerTextDrawSetSelectable(playerid, TDGrupa1[playerid][8], true);
TDGrupa1[playerid][9] = CreatePlayerTextDraw(playerid, 567.450012, 338.006591, "LD_OTB2:Ric2");PlayerTextDrawLetterSize(playerid, TDGrupa1[playerid][9], 0.000000, 0.000000);PlayerTextDrawTextSize(playerid, TDGrupa1[playerid][9], 23.000000, 19.687500);PlayerTextDrawAlignment(playerid, TDGrupa1[playerid][9], 1);PlayerTextDrawColor(playerid, TDGrupa1[playerid][9], -1);PlayerTextDrawSetShadow(playerid, TDGrupa1[playerid][9], 0);PlayerTextDrawSetOutline(playerid, TDGrupa1[playerid][9], 0);PlayerTextDrawFont(playerid, TDGrupa1[playerid][9], 4);PlayerTextDrawSetSelectable(playerid, TDGrupa1[playerid][9], true);
TDGrupa1[playerid][10] = CreatePlayerTextDraw(playerid, 567.199951, 364.206054, "LD_OTB2:Ric3");PlayerTextDrawLetterSize(playerid, TDGrupa1[playerid][10], 0.000000, 0.000000);PlayerTextDrawTextSize(playerid, TDGrupa1[playerid][10], 23.000000, 19.687500);PlayerTextDrawAlignment(playerid, TDGrupa1[playerid][10], 1);PlayerTextDrawColor(playerid, TDGrupa1[playerid][10], -1);PlayerTextDrawSetShadow(playerid, TDGrupa1[playerid][10], 0);PlayerTextDrawSetOutline(playerid, TDGrupa1[playerid][10], 0);PlayerTextDrawFont(playerid, TDGrupa1[playerid][10], 4);PlayerTextDrawSetSelectable(playerid, TDGrupa1[playerid][10], true);
TDGrupa1[playerid][11] = CreatePlayerTextDraw(playerid, 567.500000, 390.625000, "LD_OTB2:Ric4");PlayerTextDrawLetterSize(playerid, TDGrupa1[playerid][11], 0.000000, 0.000000);PlayerTextDrawTextSize(playerid, TDGrupa1[playerid][11], 23.000000, 19.687500);PlayerTextDrawAlignment(playerid, TDGrupa1[playerid][11], 1);PlayerTextDrawColor(playerid, TDGrupa1[playerid][11], -1);PlayerTextDrawSetShadow(playerid, TDGrupa1[playerid][11], 0);PlayerTextDrawSetOutline(playerid, TDGrupa1[playerid][11], 0);PlayerTextDrawFont(playerid, TDGrupa1[playerid][11], 4);PlayerTextDrawSetSelectable(playerid, TDGrupa1[playerid][11], true);
TDGrupa1[playerid][12] = CreatePlayerTextDraw(playerid, 572.500000, 420.875000, "LD_CHAT:thumbup");PlayerTextDrawLetterSize(playerid, TDGrupa1[playerid][12], 0.000000, 0.000000);PlayerTextDrawTextSize(playerid, TDGrupa1[playerid][12], 17.500000, 15.312500);PlayerTextDrawAlignment(playerid, TDGrupa1[playerid][12], 1);PlayerTextDrawColor(playerid, TDGrupa1[playerid][12], -1);PlayerTextDrawSetShadow(playerid, TDGrupa1[playerid][12], 0);PlayerTextDrawSetOutline(playerid, TDGrupa1[playerid][12], 0);PlayerTextDrawFont(playerid, TDGrupa1[playerid][12], 4);PlayerTextDrawSetSelectable(playerid, TDGrupa1[playerid][12], true);
Код:
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    if(playertextid == TDGrupa1[playerid][8])
    {
    SendClientMessage(playerid, -1, "Random 1-4");
    }
    else if(playertextid == TDGrupa1[playerid][9])
    {
    SendClientMessage(playerid, -1, "Random 1-4");
    }
    else if(playertextid == TDGrupa1[playerid][10])
    {
    SendClientMessage(playerid, -1, "Random 1-4");
    }
    else if(playertextid == TDGrupa1[playerid][11])
    {
    SendClientMessage(playerid, -1, "Random 1-4");
    }
    else if(playertextid == TDGrupa1[playerid][12])
    {
    SendClientMessage(playerid, -1, "Check");
    }
 return (true);
}
Reply
#2

Provide more code (when creating the TextDraw, a sample is enough).
Reply
#3

Edited
Reply
#4

Double check the clickable text area size defined by your PlayerTextDrawTextSize call.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)