13.03.2011, 13:38
(
Последний раз редактировалось Yuval_Baruch; 14.03.2011 в 12:02.
)
hey, is there any way that SetVehicleVelocity function will make the car go in straight line?
iv'e tested this function becouse i wanna use it in my script and when i use it the car is not exactly
going in straight line, its jumping to the sides and not going straight.
Here is my part of code that i use, if you got any idea how to make the car go in straight line i will thank you.
iv'e tested this function becouse i wanna use it in my script and when i use it the car is not exactly
going in straight line, its jumping to the sides and not going straight.
Here is my part of code that i use, if you got any idea how to make the car go in straight line i will thank you.
pawn Код:
if(newkeys == KEY_VEHICLE_ACCELERATE)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(PlayerSpeed[playerid] > 120)
{
new Float:x, Float:y, Float:z, Float:f, vid;
vid = GetPlayerVehicleID(playerid);
GetVehicleZAngle(vid,f);
GetVehicleVelocity(vid,x, y, z);
if (x >= 0.0) { x += 0.2; }
else { x -= 0.2; }
if (y >= 0.0) { y += 0.2; }
else { y -= 0.2; }
SetVehicleVelocity(vid, x, y, z);
SetVehicleZAngle(vid,f);
}
}
}