[help]How to make a Vehicle Bounce Command
#1

Hello guys tell please how to make a vehicle bounce command

Like when player Press H Horn key His Vehicle Get BOunces Please Make One For me Or Tell Me
How to make One Please Please
Reply
#2

Try this if my code below dont works!

Here:
pawn Code:
if (PRESSED(KEY_CROUCH))
{
    new Float:x, Float:y, Float:z; new vehicle=GetPlayerVehicleID(playerid);
    if(IsPlayerInAnyVehicle(playerid))
    {
        GetVehicleVelocity(vehicle,x,y,z);
        SetVehicleVelocity(vehicle,x,y,z+0.3); //vehicle bouncing
    }
    else
    {
        GetPlayerVelocity(playerid,x,y,z);
        SetPlayerVelocity(playerid,x,y,z+3.0); //player bouncing
    }
}
Reply
#3

Use hydraulics in game?
Reply
#4

Quote:
Originally Posted by fiki574_CRO
View Post
Try this if my code below dont works!

Here:
pawn Code:
if (PRESSED(KEY_CROUCH))
{
    new Float:x, Float:y, Float:z; new vehicle=GetPlayerVehicleID(playerid);
    if(IsPlayerInAnyVehicle(playerid))
    {
        GetVehicleVelocity(vehicle,x,y,z);
        SetVehicleVelocity(vehicle,x,y,z+0.3); //vehicle bouncing
    }
    else
    {
        GetPlayerVelocity(playerid,x,y,z);
        SetPlayerVelocity(playerid,x,y,z+3.0); //player bouncing
    }
}
Cannot Compile It Can you Please Make it .pwn And Compile It Too Please Please
Reply
#5

From fiki574_CRO:

pawn Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (newkeys & KEY_CROUCH)
    {
        new vehicle = GetPlayerVehicleID(playerid), Float:x, Float:y, Float:z;
       
        if(IsPlayerInAnyVehicle(playerid))
        {
            GetVehicleVelocity(vehicle,x,y,z);
            SetVehicleVelocity(vehicle,x,y,z + 0.3);
        }
        else
        {
            GetPlayerVelocity(playerid,x,y,z);
            SetPlayerVelocity(playerid,x,y,z + 3.0);
        }
    }
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)