GetVehicleRotation: Difference between revisions
Jump to navigation
Jump to search
m (→Syntax) |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
==Description== | ==Description== | ||
This function returns three floats containing the rotational position of the vehicle along the X, Y, and Z axes respectively | 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== | ==Syntax== | ||
Line 15: | Line 13: | ||
float [[GetVehicleRotation|GetVehicleRotationZ]] ( [[vehicle]] vehicle ) | float [[GetVehicleRotation|GetVehicleRotationZ]] ( [[vehicle]] vehicle ) | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''vehicle''': The [[vehicle]] whose rotation you want to retrieve. | *'''vehicle''': The [[vehicle]] whose rotation you want to retrieve. | ||
Line 25: | Line 23: | ||
if (x) | if (x) | ||
[[serverChat]] ( "Current rotation: ",x,",",y,",",z,"." ) | [[serverChat]] ( "Current rotation: ", x, " ," ,y ," ," ,z , "." ) | ||
end | end |
Revision as of 14:21, 30 March 2006
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
float float float GetVehicleRotation ( vehicle vehicle )
This function also has three variants that allow you to retrieve data from just one of the three axis.
float GetVehicleRotationX ( vehicle vehicle )
float GetVehicleRotationY ( vehicle vehicle )
float GetVehicleRotationZ ( vehicle 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) serverChat ( "Current rotation: ", x, " ," ,y ," ," ,z , "." ) end