SetVehicleZAngle
From SA-MP Wiki
(Difference between revisions)
Revision as of 14:26, 12 April 2013 Smithy (Talk | contribs) ← Previous diff |
Revision as of 17:19, 2 February 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 35: | Line 35: | ||
[[Category:Scripting Functions]] | [[Category:Scripting Functions]] | ||
+ | |||
+ | [[fr:SetVehicleZAngle]] |
Revision as of 17:19, 2 February 2014
Description:
Set the Z rotation of a vehicle.
(vehicleid, &Float:z_angl)
vehicleid | The ID of the vehicle to set the rotation of. |
Float:z_angl | The angle to set. |
Return Values:
This function does not return any specific values.
Note | A vehicle's X and Y (pitch and roll) rotation will be reset when this function is used. The X and Y rotations can not be set. |
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/flip", true) == 0) { new currentveh; new Float:angle; currentveh = GetPlayerVehicleID(playerid); GetVehicleZAngle(currentveh, angle); SetVehicleZAngle(currentveh, angle); SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been flipped."); return 1; } return 0; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- GetVehicleZAngle: Check the current angle of a vehicle.
- SetVehiclePos: Set the position of a vehicle.