01.08.2013, 13:51
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == CommandHelp[3]) // If the player clicked on the teleportLS textdraw, teleport him there!
{
for(new i = 0; i < sizeof(TextDraw); i++)
{
TextDrawShowForPlayer(playerid, Generalcmds[i]);
}
/*for(new i = 0; i < sizeof(TextDraw); i++)
{
TextDrawHideForPlayer(playerid, CommandHelp[i]);
}*/
}
else if(clickedid == CommandHelp[4]) // Same as above, but for SF
{
SetPlayerPos(playerid, -1424.6083, -290.9622, 14.1484);
SetPlayerFacingAngle(playerid, 134.9570);
}
else if(clickedid == CommandHelp[5]) // Same, but for LV
{
SetPlayerPos(playerid, 1688.7990, 1447.7753, 10.7675);
SetPlayerFacingAngle(playerid, 267.3902);
}
// Hide the textdraws after the player has seen textdraw himself.
for(new i = 0; i < sizeof(TextDraw); i++)
{
TextDrawHideForPlayer(playerid, CommandHelp[i]);
}
CancelSelectTextDraw(playerid); // Everything worked out perfectly, now stop the player to be able to select shizzle.
return 1;
}
I have to click esc to close the other textdraw
because then there are 2 textdraws -_-