SetVehicleAngularVelocity

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 01:26, 5 February 2014
Connor Mead (Talk | contribs)

← Previous diff
Revision as of 01:26, 5 February 2014
Connor Mead (Talk | contribs)

Next diff →
Line 33: Line 33:
[[Category:Scripting Functions]] [[Category:Scripting Functions]]
-[[fr:ru:SetVehicleVelocity]]+[[fr:SetVehicleVelocity]]
[[ru:SetVehicleVelocity]] [[ru:SetVehicleVelocity]]

Revision as of 01:26, 5 February 2014



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


Description:

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.


Return Values:

This function does not return any specific values.


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

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

In other languages