SetVehicleAngularVelocity

From SA-MP Wiki

Jump to: navigation, search


SetVehicleAngularVelocity was added in SA-MP 0.3x This function was added in SA-MP 0.3b and will not work in earlier versions!


Sets the angular X, Y and Z velocity of a vehicle


Image:32px-Circle-style-warning.png Important Note: This function has no effect on un-occupied vehicles and does not effect trains.


Parameters:
(vehicleid, Float:x, Float:y, Float:z)
vehicleidThe ID of the vehicle to set the velocity of.
Float:xThe amount of velocity in the angular X direction.
Float:yThe amount of velocity in the angular Y direction .
Float:zThe amount of velocity in the angular Z direction.


ReturnsThis function doesn't return a specific value


public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp("/spin", cmdtext))
    {
	if(IsPlayerInAnyVehicle(playerid))
        SetVehicleAngularVelocity(GetPlayerVehicleID(playerid), 0.0, 0.0, 2.0);
	return 1;
    }
}
Personal tools
In other languages