Nitro when press on LMB. Rep +
#7

Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
#define RELEASED(%0) \
	(((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED(KEY_FIRE))
    {
        if (IsPlayerInAnyVehicle(playerid))
        {
            new component = AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
        }
    }
    if (RELEASED(KEY_FIRE))
    {
	if (IsPlayerInAnyVehicle(playerid))
	{
	    RemoveVehicleComponent(GetPlayerVehicleID(playerid), component);
	}
    }
    return 1;
}
Reply


Messages In This Thread
Nitro when press on LMB. Rep + - by Karl[NDZ] - 24.04.2012, 13:57
Re: Nitro when press on LMB. Rep + - by kizla - 24.04.2012, 14:04
Re: Nitro when press on LMB. Rep + - by 2KY - 24.04.2012, 14:06
Re: Nitro when press on LMB. Rep + - by Karl[NDZ] - 24.04.2012, 14:31
Re: Nitro when press on LMB. Rep + - by Karl[NDZ] - 24.04.2012, 14:41
Re: Nitro when press on LMB. Rep + - by Karl[NDZ] - 24.04.2012, 14:49
Re: Nitro when press on LMB. Rep + - by Tomer!.$ - 24.04.2012, 15:05

Forum Jump:


Users browsing this thread: 1 Guest(s)