SetVehicleZAngle

From SA-MP Wiki

Jump to: navigation, search

SetVehicleZAngle


Sets the rotation of a vehicle.


Parameters:
(vehicleid, &Float:z_angl)
vehicleidThe ID of the vehicle.
Float:z_anglThe 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.

Personal tools