SA-MP Forums Archive
Can someone help me? - 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: Can someone help me? (/showthread.php?tid=200479)



Can someone help me? - Jack_Rocker - 18.12.2010

If left alt is KEY_FIRE
what is the number one? like KEY_?
(not numpad)
kthanksbyeJack


Re: Can someone help me? - JaTochNietDan - 18.12.2010

Here is a list of pre-defined key ID's from the a_samp include that comes with the server package.

pawn Код:
// Keys
#define KEY_ACTION              (1)
#define KEY_CROUCH              (2)
#define KEY_FIRE                (4)
#define KEY_SPRINT              (8)
#define KEY_SECONDARY_ATTACK    (16)
#define KEY_JUMP                (32)
#define KEY_LOOK_RIGHT          (64)
#define KEY_HANDBRAKE           (128)
#define KEY_LOOK_LEFT           (256)
#define KEY_SUBMISSION          (512)
#define KEY_LOOK_BEHIND         (512)
#define KEY_WALK                (1024)
#define KEY_ANALOG_UP           (2048)
#define KEY_ANALOG_DOWN         (4096)
#define KEY_ANALOG_LEFT         (8192)
#define KEY_ANALOG_RIGHT        (16384)

#define KEY_UP                  (-128)
#define KEY_DOWN                (128)
#define KEY_LEFT                (-128)
#define KEY_RIGHT               (128)



Re: Can someone help me? - Jack_Rocker - 18.12.2010

What do the numbers in brackets mean?


Re: Can someone help me? - JaTochNietDan - 18.12.2010

Those are the ID's of the keys.

Each key in-game has a unique ID, for KEY_FIRE, which by default San Andreas keymap setup is MOUSE1 or CTRL, the ID is 4.

You cannot detect keys which are not used in the San Andreas key configuration.


Re: Can someone help me? - Jack_Rocker - 18.12.2010

Thanks man