10.09.2009, 03:33
let's see if i still remember how to do this
if you find it is always going at a certain angle to the way you are facing, just change the + 90.0 to some dif numbers till you get it right.
pawn Код:
new Float:x, Float:y, Float:z, Float:angle, carid;
carid = GetPlayerVehicleID(playerid);
GetVehicleVelocity(carid, x, y, z);
GetPlayerZAngle(carid, angle);
x = 0.2 * floatcos(angle + 90.0, degrees) + x;
y = 0.2 * floatsin(angle + 90.0, degrees) + y;
SetVehicleVelocity(carid, x, y, z);