SA-MP Forums Archive
[FilterScript] Horn Jump, Turbo, Flip and Fix - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Horn Jump, Turbo, Flip and Fix (/showthread.php?tid=551490)



Horn Jump, Turbo, Flip and Fix - iMaximus - 19.12.2014

Hello guys. This is my first filterscript. I'm learning and still new to scripting. This is horn jump, turbo, flip and fix. Positive comments please.

How to use ?
Press number 2 for car fix.
Press Alt for turbo.
Press H or Caps Lock to horn jump.
Press Y for flip.

Codes
Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(newkeys & KEY_YES) // Flip
	{
	    if (IsPlayerInAnyVehicle(playerid)){
	    {
		        new vehicle2;
    		        new Float:zangle;
		 	vehicle2 = GetPlayerVehicleID(playerid);
			GetVehicleZAngle(vehicle2,zangle);
			SetVehicleZAngle(vehicle2,zangle);
			}
		}
	}
	if(newkeys & KEY_SUBMISSION) // Fix
	{
		if (IsPlayerInAnyVehicle(playerid)){
		{
                        RepairVehicle(GetPlayerVehicleID(playerid));
  			SetVehicleHealth(GetPlayerVehicleID(playerid),1000.0);
			}
		}
	}
	if(newkeys & KEY_FIRE) // Turbo
	{
		if (IsPlayerInAnyVehicle(playerid)){
		{
			new Float:vx, Float:vy, Float:vz;
			AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
			GetVehicleVelocity(GetPlayerVehicleID(playerid), vx, vy, vz);
			SetVehicleVelocity(GetPlayerVehicleID(playerid) ,vx * 1.5,vy * 1.5 ,vz * 1.5);
			}
		}
	}
	if(newkeys & KEY_CROUCH) // Horn Jump
	{
		if (IsPlayerInAnyVehicle(playerid)){
		{
        	        new Float:x, Float:y, Float:z;
			GetVehicleVelocity(GetPlayerVehicleID(playerid), x, y, z);
			SetVehicleVelocity(GetPlayerVehicleID(playerid) ,x ,y ,z+0.15);
			}
		}
	}
	return 1;
}



Re: Horn Jump, Turbo, Flip and Fix - LMaxCo - 10.01.2015

Nice