GetVehicleRotation

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Description

This function returns three floats containing the rotational position of the vehicle along the X, Y, and Z axes respectively as degrees. If this function does fail, it will return 'false'.

Syntax

GetVehicleRotation ( vehicle )

This function also has three variants that allow you to retrieve data from just one of the three axis.

GetVehicleRotation|GetVehicleRotationX ( vehicle )
GetVehicleRotation|GetVehicleRotationY ( vehicle )
GetVehicleRotation|GetVehicleRotationZ ( vehicle )

Required Arguments

  • vehicle: The vehicle whose rotation you want to retrieve.

Example

newcar = createVehicle ( 520, 1024, 1024, 1024 )
x, y, z = GetVehicleRotation ( newcar )
if (x)
 outputChatBox ( "Current rotation: ", x, " ," ,y ," ," ,z , "." )
end