OnPlayerClickTextDraw Help - 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: OnPlayerClickTextDraw Help (
/showthread.php?tid=520294)
OnPlayerClickTextDraw Help -
leo9 - 18.06.2014
hey guys im new started pawn, i have one question about OnPlayerClickTextDraw i have this code and i wanna if the player pressed escape (INVALID_TEXT_DRAW) the text all text draw hide but it shows again if u can pls help me
Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == Textdrawwork1)
{
SendClientMessage(playerid, 0xFFFFFFAA, "You have selected weapon dealer");
GameTextForPlayer(playerid, "Aslahe foroosh", 1000, 3);
gTeam[playerid] = TEAM_WEAPONDEALER;
TextDrawHideForPlayer(playerid , Textdrawwork0);
TextDrawHideForPlayer(playerid , Textdrawwork1);
TextDrawHideForPlayer(playerid , Textdrawwork2);
TextDrawHideForPlayer(playerid , Textdrawwork3);
TextDrawHideForPlayer(playerid , Textdrawwork4);
TextDrawHideForPlayer(playerid , Textdrawwork5);
TextDrawHideForPlayer(playerid , Textdrawwork6);
TextDrawHideForPlayer(playerid , Textdrawwork7);
TextDrawHideForPlayer(playerid , Textdrawwork8);
TextDrawHideForPlayer(playerid , Textdrawwork9);
CancelSelectTextDraw(playerid);
return 1;
}
if(clickedid == Text:INVALID_TEXT_DRAW)
{
SendClientMessage(playerid, 0xFFFFFFAA, "Canceled");
TextDrawShowForPlayer(playerid , Textdrawwork0);
TextDrawShowForPlayer(playerid , Textdrawwork1);
TextDrawShowForPlayer(playerid , Textdrawwork2);
TextDrawShowForPlayer(playerid , Textdrawwork3);
TextDrawShowForPlayer(playerid , Textdrawwork4);
TextDrawShowForPlayer(playerid , Textdrawwork5);
TextDrawShowForPlayer(playerid , Textdrawwork6);
TextDrawShowForPlayer(playerid , Textdrawwork7);
TextDrawShowForPlayer(playerid , Textdrawwork8);
TextDrawShowForPlayer(playerid , Textdrawwork9);
SelectTextDraw(playerid, 0xFF4040AA);
return 1;
}
return 1;
}
Re: OnPlayerClickTextDraw Help -
leo9 - 18.06.2014
Pls help me guys
Re: OnPlayerClickTextDraw Help -
Cena44 - 18.06.2014
pawn Код:
if(clickedid == Text:INVALID_TEXT_DRAW)
{
SendClientMessage(playerid, 0xFFFFFFAA, "Canceled");
TextDrawShowForPlayer(playerid , Textdrawwork0);
TextDrawShowForPlayer(playerid , Textdrawwork1);
TextDrawShowForPlayer(playerid , Textdrawwork2);
TextDrawShowForPlayer(playerid , Textdrawwork3);
TextDrawShowForPlayer(playerid , Textdrawwork4);
TextDrawShowForPlayer(playerid , Textdrawwork5);
TextDrawShowForPlayer(playerid , Textdrawwork6);
TextDrawShowForPlayer(playerid , Textdrawwork7);
TextDrawShowForPlayer(playerid , Textdrawwork8);
TextDrawShowForPlayer(playerid , Textdrawwork9);
SelectTextDraw(playerid, 0xFF4040AA);
return 1;
}
return 1;
}
As far as I have read and understood, you want to this to hide after someone presses ESC, right?
pawn Код:
if(clickedid == Text:INVALID_TEXT_DRAW)
{
TextDrawHideForPlayer(playerid , Textdrawwork0);
TextDrawHideForPlayer(playerid , Textdrawwork1);
TextDrawHideForPlayer(playerid , Textdrawwork2);
TextDrawHideForPlayer(playerid , Textdrawwork3);
TextDrawHideForPlayer(playerid , Textdrawwork4);
TextDrawHideForPlayer(playerid , Textdrawwork5);
TextDrawHideForPlayer(playerid , Textdrawwork6);
TextDrawHideForPlayer(playerid , Textdrawwork7);
TextDrawHideForPlayer(playerid , Textdrawwork8);
TextDrawHideForPlayer(playerid , Textdrawwork9);
return 1;
}
return 1;
}
Re: OnPlayerClickTextDraw Help -
leo9 - 18.06.2014
I wanna show a text message but it shows when i click on other textdraw too