keybind
#1

First of all i'm not referring to keybinding tools. I need a help for the script.

Coz i'm wondering if it's possible to keybind a SA-MP Keys.

For Example:

To Hire group (G Key)
Quote:

KEY_CTRL_BACK** 262144 ~k~~GROUP_CONTROL_BWD~ ~k~~GROUP_CONTROL_BWD~ H H

To Horn/Hunk (C Key)
Quote:

KEY_CROUCH 2 ~k~~PED_DUCK~ ~k~~VEHICLE_HORN~ C H / CAPSLOCK

Keys- SA-MP Wiki

I want when I press C Key it will also Hire a Group and G Key to do Horn/Hunk

Just like the sample here below:

Код:
COMMAND:kill(playerid,params[]);
{
     SetPlayerHealth(playerid,0);
     return 1;
}
Код:
COMMAND:suicide(playerid,params[]);
{
    return cmd_kill(playerid,params[]);
}
Is it possible? If i'ts possible can you please show me how?

Thanks!
Reply
#2

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_CROUCH) // C
    {
        // add the code to join a group - i.e
        SetPlayerHealth(playerid,0);
    }
    return 1;
}
I'm not sure if horn at G possible since that's the only way to actually horn in a var.
Reply
#3

I hope they are something like this

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_CROUCH) // C
    {
        // add the code to join a group - i.e
        SetPlayerHealth(playerid,0);
    }
    return 1;
}
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_CROUCH)
    {
        return KEY_CTRL_BACK;
    }
    return 1;
}
lol
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)