31.10.2017, 17:36
I'm not sure if you want to hide it with a key, or when you click on the part of the textdraw is hidden but if so I think you're wrong the correct public is public OnPlayerClickTextDraw (playerid, Text: clickedid)
Remember that to enable the Click in textdraw you have to use SelectTextDraw (playerid, 0xFF4040AA);
And to cancel it is CancelSelectTextDraw (playerid);
https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw
PHP код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(InMenu[playerid] == 1) //This would check if the variable is in x
{
if(clickedid == Textdraw66) //In this part I would go the textdraw that I click for example "Textdraw66" You change it by the textdraw that is clickable.
{
TextDrawHideForPlayer(playerid, Textdraw66);
TextDrawHideForPlayer(playerid, Textdraw67);
TextDrawHideForPlayer(playerid, Textdraw68);
TextDrawHideForPlayer(playerid, Textdraw69);
TextDrawHideForPlayer(playerid, Textdraw70);
TextDrawHideForPlayer(playerid, Textdraw71);
TextDrawHideForPlayer(playerid, Textdraw72);
TextDrawHideForPlayer(playerid, Textdraw73);
TextDrawHideForPlayer(playerid, Textdraw74);
TextDrawHideForPlayer(playerid, Textdraw75);
TextDrawHideForPlayer(playerid, Textdraw76);
TextDrawHideForPlayer(playerid, Textdraw77);
TextDrawHideForPlayer(playerid, Textdraw78);
TextDrawHideForPlayer(playerid, Textdraw79);
TextDrawHideForPlayer(playerid, Textdraw80);
TextDrawHideForPlayer(playerid, Textdraw81);
TextDrawHideForPlayer(playerid, Textdraw82);
TextDrawHideForPlayer(playerid, Textdraw83);
TextDrawHideForPlayer(playerid, Textdraw84);
TextDrawHideForPlayer(playerid, Textdraw85);
TextDrawHideForPlayer(playerid, Textdraw86);
TextDrawHideForPlayer(playerid, Textdraw87);
TextDrawHideForPlayer(playerid, Textdraw88);
TextDrawHideForPlayer(playerid, Textdraw89);
TextDrawHideForPlayer(playerid, Textdraw90);
TextDrawHideForPlayer(playerid, Textdraw91);
TextDrawHideForPlayer(playerid, Textdraw92);
TextDrawHideForPlayer(playerid, Textdraw93);
TextDrawHideForPlayer(playerid, Textdraw94);
TextDrawHideForPlayer(playerid, Textdraw95);
TextDrawHideForPlayer(playerid, Textdraw96);
TextDrawHideForPlayer(playerid, Textdraw97);
TextDrawHideForPlayer(playerid, Textdraw98);
TextDrawHideForPlayer(playerid, Textdraw99);
TextDrawHideForPlayer(playerid, Textdraw100);
TextDrawHideForPlayer(playerid, Textdraw101);
TextDrawHideForPlayer(playerid, Textdraw102);
TextDrawHideForPlayer(playerid, Textdraw103);
TextDrawHideForPlayer(playerid, Textdraw104);
TextDrawHideForPlayer(playerid, Textdraw105);
TextDrawShowForPlayer(playerid, Textdraw106);
TextDrawShowForPlayer(playerid, Textdraw107);
TextDrawShowForPlayer(playerid, Textdraw108);
TextDrawShowForPlayer(playerid, Textdraw109);
TextDrawShowForPlayer(playerid, Textdraw110);
TextDrawShowForPlayer(playerid, Textdraw111);
TextDrawShowForPlayer(playerid, Textdraw112);
TextDrawShowForPlayer(playerid, Textdraw113);
TextDrawShowForPlayer(playerid, Textdraw114);
TextDrawShowForPlayer(playerid, Textdraw115);
TextDrawShowForPlayer(playerid, Textdraw116);
TextDrawShowForPlayer(playerid, Textdraw117);
TextDrawShowForPlayer(playerid, Textdraw118);
TextDrawShowForPlayer(playerid, Textdraw119);
TextDrawShowForPlayer(playerid, Textdraw120);
TextDrawShowForPlayer(playerid, Textdraw121);
TextDrawShowForPlayer(playerid, Textdraw122);
TextDrawShowForPlayer(playerid, Textdraw123);
TextDrawShowForPlayer(playerid, Textdraw124);
TextDrawShowForPlayer(playerid, Textdraw125);
TextDrawShowForPlayer(playerid, Textdraw126);
TextDrawShowForPlayer(playerid, Textdraw127);
TextDrawShowForPlayer(playerid, Textdraw128);
TextDrawShowForPlayer(playerid, Textdraw129);
TextDrawShowForPlayer(playerid, Textdraw130);
TextDrawShowForPlayer(playerid, Textdraw131);
TextDrawShowForPlayer(playerid, Textdraw132);
TextDrawShowForPlayer(playerid, Textdraw133);
TextDrawShowForPlayer(playerid, Textdraw134);
TextDrawShowForPlayer(playerid, Textdraw135);
TextDrawShowForPlayer(playerid, Textdraw136);
TextDrawShowForPlayer(playerid, Textdraw137);
TextDrawShowForPlayer(playerid, Textdraw138);
TextDrawShowForPlayer(playerid, Textdraw139);
InMenu[playerid] =0;
return 0;
}
And to cancel it is CancelSelectTextDraw (playerid);
https://sampwiki.blast.hk/wiki/OnPlayerClickTextDraw