Are there other keys that aren't defined in a_samp?
#1

Are there other keys that aren't in the a_samp?
If yes, can you tell me some of it's ID or the website where i can find a list?
I need 4, 5 and 6 Numpad please.

I saw a filterscript by Slice that uses 4, 5 and 6 NumPad.

Reply
#2

If you check in slice's script his OnPlayerKeyStateChange code (which is quite impressive)
You will find out that he uses iKeyLeft and iKeyRight to store the current keys which change with the player state

The part you wanted
pawn Код:
if ( newstate == PLAYER_STATE_ONFOOT )
{
    iKeyLeft[ playerid ] = KEY_ANALOG_LEFT;
    iKeyRight[ playerid ] = KEY_ANALOG_RIGHT;
}
else
{
    iKeyLeft[ playerid ] = KEY_LEFT;
    iKeyRight[ playerid ] = KEY_RIGHT;
}
To your header question, yes there are like KEY_AIM (which can be found in the wiki)
Just put a print in your OnPlayerKeyStateChange and press all keys if it prints something the key can be used
But basically that are only the keys you defined within GTA for on foot and in vehicle
Reply
#3

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
If you check in slice's script his OnPlayerKeyStateChange code (which is quite impressive)
You will find out that he uses iKeyLeft and iKeyRight to store the current keys which change with the player state

The part you wanted
pawn Код:
if ( newstate == PLAYER_STATE_ONFOOT )
{
    iKeyLeft[ playerid ] = KEY_ANALOG_LEFT;
    iKeyRight[ playerid ] = KEY_ANALOG_RIGHT;
}
else
{
    iKeyLeft[ playerid ] = KEY_LEFT;
    iKeyRight[ playerid ] = KEY_RIGHT;
}
To your header question, yes there are like KEY_AIM (which can be found in the wiki)
Just put a print in your OnPlayerKeyStateChange and press all keys if it prints something the key can be used
But basically that are only the keys you defined within GTA for on foot and in vehicle
I don't use KEY_AIM, because it's the SAME ID of KEY_HANDBRAKE.
And KEY_LOOK_BEHIND too, it's the SAME ID of KEY_SUBMISSION.

But the function you placed there, what do it does?
Reply
#4

Of course you dont need to use KEY_AIM
The names are there to know what key it is or can you image as outsider that KEY_HANDBRAKE is the aim key on foot ? I guess not

What it does ? it set iKeyLeft (the key to go left in the action menu) and iKeyRight (the key to go right ...)

Slice used KEY_ANALOG_LEFT (default: NUM4) and KEY_ANALOG_RIGHT (default: NUM6) if you were on foot
If you werent you needed to control the menu with KEY_LEFT and KEY_RIGHT
Reply
#5

Yes, thanks, but I already used your method to print the keys, I already found KEY_ANALOG_LEFT and KEY_ANALOG_RIGHT that are 4 and 6, but what keys are KEY_ANALOG_UP and KEY_ANALOG_DOWN
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)