Nitro-REALESED
#8

Here you are

PHP код:
#define HOLDING(%0) \
    
((newkeys & (%0)) == (%0))
    
#define RELEASED(%0) \
    
(((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
    
public 
OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    if(
HOLDING(KEY_FIRE))
    {
        if(
IsPlayerInAnyVehicle(playerid))
        {
            
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
        }
    }
    else if(
RELEASED(KEY_FIRE))
    {
        if(
IsPlayerInAnyVehicle(playerid))
        {
            
RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
        }
    }
    return 
1;

Reply


Messages In This Thread
Nitro-REALESED - by IvancheBG - 25.07.2012, 10:39
Re: Nitro-REALESED - by Rudy_ - 25.07.2012, 10:48
Re: Nitro-REALESED - by IvancheBG - 25.07.2012, 10:49
Re: Nitro-REALESED - by Rudy_ - 25.07.2012, 10:52
Re: Nitro-REALESED - by IvancheBG - 25.07.2012, 11:02
Re: Nitro-REALESED - by IvancheBG - 26.07.2012, 08:24
Re: Nitro-REALESED - by McCurdy - 26.07.2012, 08:31
Re: Nitro-REALESED - by Alexis1999 - 26.07.2012, 08:32
Re: Nitro-REALESED - by IvancheBG - 26.07.2012, 09:17

Forum Jump:


Users browsing this thread: 1 Guest(s)