speed
#1

Hello, I try to do a speed boost to the forward with car.


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys == KEY_CTRL_BACK)
{
if(IsPlayerInAnyVehicle(playerid))
{
new Float: vX, Float: vY, Float: vZ;
GetPlayerVelocity(playerid, vX, vY, vZ);
SetPlayerVelocity(playerid, vX + 5.0, vY , vZ);
}
}
return 1;
}


This Boost works just in x coordinate, but I want what ot work to the forward of player. How I can change direction?


Sorry for my bad english
Reply


Messages In This Thread
speed boost help - by Heress - 21.07.2018, 09:10
Re: speed - by coool - 21.07.2018, 09:47
Re: speed - by Sew_Sumi - 21.07.2018, 10:14
Re: speed - by Heress - 21.07.2018, 10:14
Re: speed - by Sew_Sumi - 21.07.2018, 10:18
Re: speed - by Heress - 21.07.2018, 10:25

Forum Jump:


Users browsing this thread: 3 Guest(s)