SA-MP Forums Archive
Define a key - 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: Define a key (/showthread.php?tid=507428)



Define a key - TheSy - 17.04.2014

Hi

I try to set an undefined SAMP button.

I could find out about it:

https://sampwiki.blast.hk/wiki/Define_KEY_AIM

But how do you know which key is defined?

thank you


Re: Define a key - Pottus - 17.04.2014

It tells you right there #define KEY_HANDBRAKE


Re: Define a key - TheSy - 17.04.2014

Quote:
Originally Posted by [uL]Pottus
Посмотреть сообщение
It tells you right there #define KEY_HANDBRAKE
Yes but how do I define my own key (K) for example.


Re: Define a key - Pottus - 17.04.2014

You can only use the keys that are listed.


Re: Define a key - TheSy - 17.04.2014

So I can not detect if a player presses the key K, then?


Re: Define a key - Niko_boy - 17.04.2014

Quote:
Originally Posted by TheSy
Посмотреть сообщение
So I can not detect if a player presses the key K, then?
nop no way.

You can only detects key which are listed on that page.


Re: Define a key - Pottus - 17.04.2014

You can bind K to a key however and use that, the most useful ones are KEY_YES / KEY_NO as these keys have purpose in SAMP but are still detected.


Re: Define a key - TheSy - 17.04.2014

I must search the key K.

And I want to detect So, if the player presses the H and K at the same time key, but I do not know how to define K.


Re: Define a key - Vince - 17.04.2014

It cannot be done!


Re: Define a key - TheSy - 17.04.2014