SAMP keys question - 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: SAMP keys question (
/showthread.php?tid=389257)
SAMP keys question -
LetsOWN[PL] - 01.11.2012
Hey everyone.
Does anyone knows, what ID has the ESC button?
I have tried to determine if using this little code:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new sprunk[32];
format(sprunk, 32, "%d - %d", newkeys, oldkeys);
SendClientMessage(playerid, 0xaacc00ff, sprunk);
return 1;
}
However, it didn't worked when I've pressed this escape btn (nothing was shown in the chat window)
.. is this id even exists?
Greetz,
LetsOWN
Re: SAMP keys question -
DBan - 01.11.2012
I don't believe it does. ESC is used to pause the game, so...
EDIT: Here's a list of available keys
https://sampwiki.blast.hk/wiki/GetPlayerKeys
Re: SAMP keys question -
JaKe Elite - 01.11.2012
No there is no key for the ESC.
Re: SAMP keys question -
LetsOWN[PL] - 01.11.2012
Thank you for quick answers!
Hm, so.. I wanted to know this ID to make script which would detect if player pressed esc button when he was on SelectPlayerTextdraw mode (as you know, when you press esc - you are exiting this mode).
Err, so another question - is there any way to track whether function CancelSelectTextDraw beings called? I just wanna know to somehow prevent bugs in my wanna-cool-be textdraw-based command list.
Greetz,
LetsOWN
Re: SAMP keys question - rjjj - 01.11.2012
Quote:
Originally Posted by LetsOWN[PL]
Thank you for quick answers!
Hm, so.. I wanted to know this ID to make script which would detect if player pressed esc button when he was on SelectPlayerTextdraw mode (as you know, when you press esc - you are exiting this mode).
|
Inside the
OnPlayerClickTextDraw's definition, verify if
clickedid is equal to
INVALID_TEXT_DRAW 
:
pawn Код:
if(clickedid == Text:(INVALID_TEXT_DRAW))
Quote:
Originally Posted by LetsOWN[PL]
Err, so another question - is there any way to track whether function CancelSelectTextDraw beings called? I just wanna know to somehow prevent bugs in my wanna-cool-be textdraw-based command list.
Greetz,
LetsOWN 
|
Hook the function

.
I hope that I have helped

.
Re: SAMP keys question -
LetsOWN[PL] - 01.11.2012
Thanks mate