SA-MP Forums Archive
PlayerTextDrawSetSelectable - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: PlayerTextDrawSetSelectable (/showthread.php?tid=548101)



[SOLVED] PlayerTextDrawSetSelectable(); - Wan - 27.11.2014

Please help...

It shows me the textdraw and everything, even the mouse cursor appears, but when I click on it, it doesn't send me the message/notification, what's up with that?

pawn Код:
new PlayerText:oDestroy[MAX_PLAYERS];
       
oDestroy[playerid] = CreatePlayerTextDraw(playerid, 235.000000, 400.000000, "~r~destroy");
PlayerTextDrawTextSize(playerid, oDestroy[playerid], 60.000000, 20.000000);
PlayerTextDrawAlignment(playerid, oDestroy[playerid],0);
PlayerTextDrawFont(playerid, oDestroy[playerid], 3);
PlayerTextDrawLetterSize(playerid, oDestroy[playerid], 0.4, 1.0);
PlayerTextDrawColor(playerid, oDestroy[playerid], 0xffffffff);
PlayerTextDrawSetProportional(playerid, oDestroy[playerid], 1);
PlayerTextDrawSetOutline(playerid, oDestroy[playerid], 1);

PlayerTextDrawSetSelectable(playerid, oDestroy[playerid], 1);
PlayerTextDrawShow(playerid, oDestroy[playerid]);

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_SUBMISSION)
    {
        SelectTextDraw(playerid, 0xFF4040AA);
    }
    return 1;
}

public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    if(playertextid == oDestroy[playerid])
    {
         SendClientMessage(playerid, 0xFFFFFFAA, "You clicked on a textdraw.");
         CancelSelectTextDraw(playerid);
    }
    return 1;
}