18.06.2014, 12:10
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; }