PDA

View Full Version : OnPlayerClickPlayerTextDraw don't get called!


DarkPower
03/03/2013, 10:38 AM
This is playerTextDraw's


bankomatTD[playerid][2] = CreatePlayerTextDraw(playerid,442.000000, 100.000000, "_");
PlayerTextDrawBackgroundColor(playerid,bankomatTD[playerid][2], 255);
PlayerTextDrawFont(playerid,bankomatTD[playerid][2], 1);
PlayerTextDrawLetterSize(playerid,bankomatTD[playerid][2], 0.500000, 14.199999);
PlayerTextDrawColor(playerid,bankomatTD[playerid][2], -1);
PlayerTextDrawSetOutline(playerid,bankomatTD[playerid][2], 0);
PlayerTextDrawSetProportional(playerid,bankomatTD[playerid][2], 1);
PlayerTextDrawSetShadow(playerid,bankomatTD[playerid][2], 1);
PlayerTextDrawUseBox(playerid,bankomatTD[playerid][2], 1);
PlayerTextDrawBoxColor(playerid,bankomatTD[playerid][2], 80);
PlayerTextDrawTextSize(playerid,bankomatTD[playerid][2], 200.000000, 0.000000);
PlayerTextDrawSetSelectable(playerid,bankomatTD[playerid][2], 0);

bankomatTD[playerid][0] = CreatePlayerTextDraw(playerid,234.000000, 130.000000, "DIZANJE NOVCA");
PlayerTextDrawBackgroundColor(playerid,bankomatTD[playerid][0], 255);
PlayerTextDrawFont(playerid,bankomatTD[playerid][0], 2);
PlayerTextDrawLetterSize(playerid,bankomatTD[playerid][0], 0.500000, 2.000000);
PlayerTextDrawColor(playerid,bankomatTD[playerid][0], -1);
PlayerTextDrawSetOutline(playerid,bankomatTD[playerid][0], 1);
PlayerTextDrawSetProportional(playerid,bankomatTD[playerid][0], 1);
PlayerTextDrawUseBox(playerid,bankomatTD[playerid][0], 1);
PlayerTextDrawBoxColor(playerid,bankomatTD[playerid][0], -16776961);
PlayerTextDrawTextSize(playerid,bankomatTD[playerid][0], 402.000000, 15.000000);
PlayerTextDrawSetSelectable(playerid,bankomatTD[playerid][0], 1);

bankomatTD[playerid][1] = CreatePlayerTextDraw(playerid,231.000000, 156.000000, "STANJE RACUNA");
PlayerTextDrawBackgroundColor(playerid,bankomatTD[playerid][1], 255);
PlayerTextDrawFont(playerid,bankomatTD[playerid][1], 2);
PlayerTextDrawLetterSize(playerid,bankomatTD[playerid][1], 0.500000, 2.000000);
PlayerTextDrawColor(playerid,bankomatTD[playerid][1], -1);
PlayerTextDrawSetOutline(playerid,bankomatTD[playerid][1], 1);
PlayerTextDrawSetProportional(playerid,bankomatTD[playerid][1], 1);
PlayerTextDrawUseBox(playerid,bankomatTD[playerid][1], 1);
PlayerTextDrawBoxColor(playerid,bankomatTD[playerid][1], -16776961);
PlayerTextDrawTextSize(playerid,bankomatTD[playerid][1], 405.000000, 15.000000);
PlayerTextDrawSetSelectable(playerid,bankomatTD[playerid][1], 1);

bankomatTD[playerid][3] = CreatePlayerTextDraw(playerid,269.000000, 182.000000, "ODJAVA");
PlayerTextDrawBackgroundColor(playerid,bankomatTD[playerid][3], 255);
PlayerTextDrawFont(playerid,bankomatTD[playerid][3], 2);
PlayerTextDrawLetterSize(playerid,bankomatTD[playerid][3], 0.500000, 2.000000);
PlayerTextDrawColor(playerid,bankomatTD[playerid][3], -1);
PlayerTextDrawSetOutline(playerid,bankomatTD[playerid][3], 1);
PlayerTextDrawSetProportional(playerid,bankomatTD[playerid][3], 1);
PlayerTextDrawUseBox(playerid,bankomatTD[playerid][3], 1);
PlayerTextDrawBoxColor(playerid,bankomatTD[playerid][3], -16776961);
PlayerTextDrawTextSize(playerid,bankomatTD[playerid][3], 355.000000, 15.000000);
PlayerTextDrawSetSelectable(playerid,bankomatTD[playerid][3], 1);


And when i use /atm i have:


PlayerTextDrawShow(playerid, bankomatTD[playerid][0]);
PlayerTextDrawShow(playerid, bankomatTD[playerid][1]);
PlayerTextDrawShow(playerid, bankomatTD[playerid][2]);
PlayerTextDrawShow(playerid, bankomatTD[playerid][3]);
SelectTextDraw(playerid, 0x3C00FFFF);


http://prntscr.com/uuo6b
http://prntscr.com/uuo78
http://prntscr.com/uuo81

And it work's great, BUT, when i click on some TD nothing happens! Weird...

This is my OnPlayerClickPlayerTextDraw


public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(playertextid == bankomatTD[playerid][3] || playertextid == bankomatTD[playerid][1] || playertextid == bankomatTD[playerid][2])
{
PlayerTextDrawHide(playerid, bankomatTD[playerid][0]);
PlayerTextDrawHide(playerid, bankomatTD[playerid][1]);
PlayerTextDrawHide(playerid, bankomatTD[playerid][2]);
PlayerTextDrawHide(playerid, bankomatTD[playerid][3]);
CancelSelectTextDraw(playerid);
}
return (true);
}

DarkPower
03/03/2013, 01:05 PM
bump