SA-MP Forums Archive
[REQ] Hide Textdraw. - 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: [REQ] Hide Textdraw. (/showthread.php?tid=570446)



[REQ] Hide Textdraw. - GatsbyTrieu - 10.04.2015

I got a question. How to make an function can be hide some textdraw when player press ESC button. Thanks


Re : [REQ] Hide Textdraw. - Etolas - 10.04.2015

If you want to do it when SelectTextDraw is open it's easy:

Go to your callback OnPlayerClickTextDraw, and use, if(clickedid == INVALID_TEXTDRAW_ID) and then use TextDrawHideForPlayer

If you want to do this when selectTextDraw is closed, don't use ESC, it will open the menu of the player, you can use OnPlayerKeyStateChange and do this (Example here with key 'N'):

if(newkeys==KEY_NO)
{
TextDrawHideForPlayer(playerid, yourtextdraw);
}

Hope i've helped you


Re: [REQ] Hide Textdraw. - GatsbyTrieu - 10.04.2015

No. I Mean key ESC same DIALOG can be closed by this button. -_-. Any idea ?


Re: [REQ] Hide Textdraw. - Jimmy0wns - 10.04.2015

No, there is no way you can detect if a player pressed ESC.


Re: [REQ] Hide Textdraw. - GatsbyTrieu - 10.04.2015

k thanks.