SA-MP Forums Archive
Textdraw clickable problem - 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: Textdraw clickable problem (/showthread.php?tid=487586)



Textdraw clickable problem - Face9000 - 14.01.2014

Can someone explain me why if i click a textdraw, or i open a clickable texdraws list, if i press EC the textdraws doesn't hide? Is very annoying. Any tip to fix it?


Re: Textdraw clickable problem - SilentSoul - 14.01.2014

https://sampwiki.blast.hk/wiki/CancelSelectTextDraw
https://sampwiki.blast.hk/wiki/TextDrawHideForPlayer
I think you can't disable with pressing ESC because esc key isn't found on key list , try to find another key also if you want to show again use https://sampwiki.blast.hk/wiki/SelectTextDraw


Re: Textdraw clickable problem - Face9000 - 14.01.2014

The problem is i NEED to hide those textdraws when i press Esc key. I have a textdraw shop where you can select weapons and if i press Esc the textdraws stays..and this is ugly.


Re: Textdraw clickable problem - SilentSoul - 14.01.2014

Have you tried to use mSelection ? also there is many filterscripts on that :
https://sampforum.blast.hk/showthread.php?tid=462752
https://sampforum.blast.hk/showthread.php?tid=412066
Edit: another suggestion , just create a cancel button inside your textdraws and when the player click on that button hide the textdraws for him and if it's clickable just use CancelSelectTextDraw.


Re: Textdraw clickable problem - xZdadyZx - 14.01.2014

OnPlayerKeyState and find name for ES key. If there is no name for that key, then you cannot close them with ES key.


Re: Textdraw clickable problem - Face9000 - 14.01.2014

I don't wanna use mSelection. About the cancel button, i already made it. But what if player wrongly press ESC or he thinks ESC key can disable shop? They have to open it again and click the cancel button i made, to hide textdraws. This is why is a bit annoying.


Re: Textdraw clickable problem - [WA]iRonan - 14.01.2014

Quote:
Originally Posted by Face9000
Посмотреть сообщение
I don't wanna use mSelection. About the cancel button, i already made it. But what if player wrongly press ESC or he thinks ESC key can disable shop? They have to open it again and click the cancel button i made, to hide textdraws. This is why is a bit annoying.
just hide the textdraws when a player presses ESC. Shouldn't be too hard to do, or set them clickable again.


Re: Textdraw clickable problem - Face9000 - 14.01.2014

The problem is, HOW i can detect if ESC key is pressed?


Re: Textdraw clickable problem - xZdadyZx - 14.01.2014

Quote:
Originally Posted by Face9000
Посмотреть сообщение
The problem is, HOW i can detect if ESC key is pressed?
OnPlayKeyStage I already said, it gets player key. You can make OnPlayKeyStage (examle) key_no SendClientMessage playerid,color Yiu are not admin.


Re: Textdraw clickable problem - Face9000 - 14.01.2014

Emh, as i know you can't detect ESC key from OnPlayerKeyStateChange.