01.11.2013, 18:15
So, long time no script! When I'm here, means I got problem with scripting and there's no one around to help me so..
It's about speedboost and bounce. I did this.
When I tested it, it doesn't look really good as i expected.
I expected speedboost will go straight and bounce will go jump without stopping (or just bounce and going forward a bit)
So, how can I fix this?
It's about speedboost and bounce. I did this.
pawn Код:
if((newkeys & KEY_FIRE))
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float:Velocity[3];
if(Boost[playerid] == 1)
GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]);
SetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0]*2, Velocity[1]*2, Velocity[2]*2);
}
}
if((newkeys & KEY_CROUCH))
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
new Float:Velocity[3];
if(Bounce[playerid] == 1)
GetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]);
SetVehicleVelocity(GetPlayerVehicleID(playerid), Velocity[0], Velocity[1], Velocity[2]+0.39);
}
}
I expected speedboost will go straight and bounce will go jump without stopping (or just bounce and going forward a bit)
So, how can I fix this?