This function was added in SA-MP 0.3b and will not work in earlier versions!
This function has no effect on unoccupied vehicles and does not affect trains.
(vehicleid, Float:X, Float:Y, Float:Z)
vehicleid
The ID of the vehicle to set the velocity of.
Float:X
The amount of velocity in the angular X direction.
Float:Y
The amount of velocity in the angular Y direction.
Float:Z
The amount of velocity in the angular Z direction.
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/spin", cmdtext))
{
if(IsPlayerInAnyVehicle(playerid))
SetVehicleAngularVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 2.0);
return 1;
}
}
The following functions may be useful, as they are related to this function in one way or another.