SA-MP Forums Archive
Catching ESCAPE key on Selection Cancel - 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: Catching ESCAPE key on Selection Cancel (/showthread.php?tid=629485)



Catching ESCAPE key on Selection Cancel - Riwerry - 27.02.2017

Hello again, is it possible to catch Escape key, which forces SelectObject to hide crusor?
I know that it's possible to catch this key, with selection TDs, but didn't found anything about SelectObject, thanks.


Re: Catching ESCAPE key on Selection Cancel - NaS - 27.02.2017

There is no reliable way unfortunately.

But unlike SelectTextDraw, SelectObject does not reset the cursor to the center when called while selecting. Also keys can still be detected while selecting.
This means, that you could continously force the player into selection (use a timer), and tell him to use another key (for example F) to exit selection. Kinda replacement for ESC key.