20.01.2010, 19:16
use GetVehicleVelocity, and then do something similar to this
@MadeMan, you are confusing velocities with coords.
pawn Код:
SetVelocityForward(playerid, Float:multi)
{
if (IsPlayerInAnyVehicle(playerid))
{
new Float:angle, Float:velox, Float:veloy;
GetPlayerFacingAngle(playerid, angle);
velox = multi * floatsin(angle, degrees);
veloy = multi * floatcos(angle, degrees);
SetVehicleVelocity(GetPlayerVehicleID(playerid), velox, veloy, 0.01);
}
return 1;
}