SAMP keys question
#1

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
Reply
#2

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
Reply
#3

No there is no key for the ESC.
Reply
#4

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
Reply
#5

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 .
Reply
#6

Thanks mate
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)