SetVehicleZAngle
From SA-MP Wiki
SetVehicleZAngle
Sets the rotation of a vehicle.
(vehicleid, &Float:z_angl)
| vehicleid | The ID of the vehicle. |
| Float:z_angl | The variable to store the rotation, passed by reference. |
This function does not return a specific value.
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 might be useful as well, as they're related to this function in one way or another.
- GetVehicleZAngle: Check the current angle of a vehicle.
- SetVehiclePos: Set the position of a vehicle.
