03.12.2012, 20:53
Eu tenho o textdraw criado e tem a funзгo de ter clicбvel.
Depois tenho o comando
depois apareзo tudo bem para clicar..
E depois sigo para a public OnPlayerClickTextDraw
E dentro dela estб..
Depois tenho o comando
pawn Код:
if(strcmp(cmd, "/textdraw", true) == 0)
{
TextDrawShowForPlayer(playerid, TextDraw01);
TextDrawShowForPlayer(playerid, TextDraw02);
TextDrawShowForPlayer(playerid, TextDraw03);
TextDrawShowForPlayer(playerid, TextDraw04);
TextDrawShowForPlayer(playerid, TextDraw05);
SelectTextDraw(playerid, COLOR_GREEN);
return 1;
}
E depois sigo para a public OnPlayerClickTextDraw
E dentro dela estб..
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == TextDraw01)
{
SendClientMessage(playerid, -1, " clicou no TextDraw01 ");
}
if(clickedid == TextDraw02)
{
SendClientMessage(playerid, -1, " clicou no TextDraw02 ");
}
if(clickedid == TextDraw03)
{
SendClientMessage(playerid, -1, " clicou no TextDraw03 ");
}
if(clickedid == TextDraw04)
{
SendClientMessage(playerid, -1, " clicou no TextDraw04 ");
}
if(clickedid == TextDraw05)
{
SendClientMessage(playerid, -1, " clicou no TextDraw05 ");
}
TextDrawHideForPlayer(playerid, TextDraw01);
TextDrawHideForPlayer(playerid, TextDraw02);
TextDrawHideForPlayer(playerid, TextDraw03);
TextDrawHideForPlayer(playerid, TextDraw04);
TextDrawHideForPlayer(playerid, TextDraw05);
CancelSelectTextDraw(playerid);
return 1;
}