Коды клавиш самп
The following example shows how you can regularly check the up/down/left/right values using OnPlayerUpdate.
Example Usage:
For a full list of all available keys, see here.
Related Callbacks
The following callbacks might be useful as well, as they are related to this callback in one way or another.
Backspace - 8
Tab - 9
Enter - 13
Shift - 16
Ctrl - 17
Pause - 19
CapsLock - 20
Esc - 27
Space - 32
Page Up - 33
Page Down - 34
End - 35
Home - 36
Insert - 45
Delete - 46
Scroll Lock - 145
Num Lock - 144
(1) Key not defined in SA:MP includes. You must define this yourself or use KEY_HANDBRAKE.
(2) Supported since 0.3d. Not detectable in earlier versions. This key can not be detected when the player is in spectator mode.
(3) GROUP_CONTROL_FWD cannot be detected in SA-MP, as it used internally to enter vehicles as passenger. However, the gametext definition still exists.
(4) If the key number "262144" does not work, just use key number "2".
(5) This value is the sum of KEY_LOOK_LEFT and KEY_LOOK_RIGHT.
(6) Only detected when "JOYPAD" configuration is selected for controller.
(7) Embedding codes only work for client messages, textdraws and gametexts.
Читайте также: