SetVehicleZAngle
Description:
Function SetVehicleZAngle set the Z rotation (yaw) of a vehicle.
|
Parameters:
(vehicleid, &Float:z_angle)
int | vehicleid | The ID of the vehicle to set the rotation of. |
float | z_angle | The Z angle to set. |
Return Values:
- 1: The function was executed successfully.
- 0: The function failed to execute. The vehicle specified does not exist.
Examples:
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.