[FilterScript] Horn Jump, Turbo, Flip and Fix
#1

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;
}
Reply
#2

Nice
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)