putted 2 hotkeys - one is working and other no! help?
#3

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    #define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

    if(PRESSED(KEY_FIRE))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
        }
    }

    if(PRESSED(KEY_CROUCH))
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
            GivePlayerWeapon(playerid, 46, 500);
        }
    }

    return 1;
}
Reply


Messages In This Thread
putted 2 hotkeys - one is working and other no! help? - by SilverKiller - 11.11.2012, 07:44
Re: putted 2 hotkeys - one is working and other no! help? - by KomplettMaster - 24.12.2012, 23:11
Re: putted 2 hotkeys - one is working and other no! help? - by SuperViper - 25.12.2012, 01:38

Forum Jump:


Users browsing this thread: 3 Guest(s)