SA-MP Forums Archive
ENTER/RETURN 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ENTER/RETURN key (/showthread.php?tid=78569)



ENTER/RETURN key - alex.naoumov - 21.05.2009

Hi,
I need the name of the enter/return key, to exit cars etc.
I've looked here: https://sampwiki.blast.hk/wiki/GetPlayerKeys#Special_Keys, no results.
Can somebody give me a #define or someting?
Bye



Re: ENTER/RETURN key - Badger(new) - 21.05.2009

well you didn't look close enough.

Define Value Key on foot Key in Vehicle

KEY_SECONDARY_ATTACK 16 ~k~~VEHICLE_ENTER_EXIT ~~k~~VEHICLE_FIREWEAPON_ALT~


If you look, it says that when the player is on foot (not in a vehicle), that is what it does.


Re: ENTER/RETURN key - MenaceX^ - 21.05.2009

They are already defined in a_samp include.
Anyway, it's called: KEY_SECONDARY_ATTACK.


Re: ENTER/RETURN key - alex.naoumov - 21.05.2009

It works thanks .
Is it possible to use keys like 1,3,4,5,6,7,8,9,0 ?
Except 0, cause it's for airplane gear.
Bye


Re: ENTER/RETURN key - MenaceX^ - 21.05.2009

Quote:
Originally Posted by alex.naoumov
It works thanks .
Is it possible to use keys like 1,3,4,5,6,7,8,9,0 ?
Except 0, cause it's for airplane gear.
Bye
I don't understand you.


Re: ENTER/RETURN key - AiVAMAN - 21.05.2009

Value is the key number.


Re: ENTER/RETURN key - Badger(new) - 21.05.2009

what he means I think, is the keys above the letters 1,2,3,4,5,6,7,8,9,0 or the ones on the keypad 0-9.

Most of them aren't defined and cannot be used except in typing (t).


Re: ENTER/RETURN key - alex.naoumov - 21.05.2009

Ok, yea that's what I mean, above the letters.



Re: ENTER/RETURN key - Badger(new) - 21.05.2009

The only keys used are:

The numbers above the letters: 2 (I think only 2)

NumberPad: 2,4,6,8


Re: ENTER/RETURN key - Cueball - 22.05.2009

No, it is extremely possible to detect those keypresses, as long as the player has configured their game to use those keys. You can not count on a single key function being assigned to a certain key - for example, I am on a laptop, so instead of having to hold the function key and press the numeric function keys, I re-assigned the keys so that I can press J, K, L, I to use the special action keys.

Don't assume anything about keys, because you don't know everybody's key settings.

~Cueball~