[FilterScript] Unlimited Nitro (Drift Edition)(Simple)
#1

This is not really a full filterscript but you can add it to your gamemode.
This is my 1st Filterscript or Tutorial or w/e you'll call it.
I've searched for this but never really found anything like this. As Drifter is it good that nitro stops so you don't spin out.

Yes. I know you can make this very easy by looking at wiki.sa-mp.com but I decided to post it here.
Please don't hate.
Код:
#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_ACTION)) //KEY_ACTION can also be changed to KEY_FIRE wich is orginal LMB
	{
		if(IsPlayerInAnyVehicle(playerid))
		{
			AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
		}
	}
	if(RELEASED(KEY_ACTION))
 	{
 	    if(IsPlayerInAnyVehicle(playerid))
 	    {
 	        RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
 	    }
 	}
	if(PRESSED(KEY_SUBMISSION))
	{
	new vehicleid = GetPlayerVehicleID(playerid);
	if(IsPlayerInVehicle(playerid, vehicleid))
 	{
		SetVehicleHealth(vehicleid,1000.0);
        RepairVehicle(GetPlayerVehicleID(playerid));
		PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
  	}
	}
	return 1;
}
If you don't like this ok I don't care.
Reply


Messages In This Thread
Unlimited Nitro (Drift Edition)(Simple) - by mrsamp - 02.08.2012, 15:46
Re: Unlimited Nitro (Drift Edition)(Simple) - by Jessyy - 02.08.2012, 19:12
Re: Unlimited Nitro (Drift Edition)(Simple) - by DarkB0y - 02.08.2012, 19:17
Re: Unlimited Nitro (Drift Edition)(Simple) - by AaronKillz - 02.08.2012, 20:41
Re: Unlimited Nitro (Drift Edition)(Simple) - by xSkullx - 02.08.2012, 21:32
Re: Unlimited Nitro (Drift Edition)(Simple) - by jpeg - 02.08.2012, 21:36

Forum Jump:


Users browsing this thread: 3 Guest(s)