defining keys not predefined - 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: defining keys not predefined (
/showthread.php?tid=636326)
defining keys not predefined -
Beasthian - 25.06.2017
well it says
Key not defined in SA:MP includes. You must define this yourself
How to we do that? e.g detect with someone presses 't' to chat.
i assume we have to find the value of the key but where do I find it
like this is how key up is defined. Where could I find the value of 't'
#define KEY_UP (-12
't' is a key that is already used in samp so shouldn't it be able to be defined it in a_samp? its not like its a key that doesn't have a use in samp.
Re: defining keys not predefined -
Gammix - 25.06.2017
https://sampwiki.blast.hk/wiki/Keys
All of these are predefined.
The only one not is:
PHP код:
#define KEY_AIM 128
And these are the only set of keys you can detect under OnPlayerKeyStateChange.
Look for "GetPlayerKeys" for movement keys.
Re: defining keys not predefined -
Beasthian - 25.06.2017
so no way possible to define other keys. Thanks!