SA-MP Forums Archive
Key detection - 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: Key detection (/showthread.php?tid=572173)



Key detection - vannesenn - 25.04.2015

Hu guys,
how I can detect when player press some other key(eg. X, V, B etc...)?


Re: Key detection - MP2 - 26.04.2015

You cannot detect specific keys, only mapped game functions. For example, you can't detect SPACE or SHIFT, but you can detect 'Sprint' and 'Jump'.

See the wiki for more info:
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
https://sampwiki.blast.hk/wiki/GetPlayerKeys


Re: Key detection - Mencent - 26.04.2015

Hello!

Here is a list for key, which you can detect.
https://sampwiki.blast.hk/wiki/Keys


Re: Key detection - vannesenn - 26.04.2015

Okey... Can player walk/jump/sprint/crouch in same time when is SelectTextDraw turned on?


Re: Key detection - Mencent - 26.04.2015

No you can't walk or sprint if SelectTextDraw is turned on.


Re: Key detection - vannesenn - 26.04.2015

Damm it, tanks