SetVehicleRotation: Difference between revisions
Jump to navigation
Jump to search
Line 16: | Line 16: | ||
newcar = [[createVehicle]] ( 520, 1024, 1024, 1024 ) | newcar = [[createVehicle]] ( 520, 1024, 1024, 1024 ) | ||
if ([[SetVehicleRotation]] ( newcar, 0, 0, 270 )) | if ( [[SetVehicleRotation]] ( newcar, 0, 0, 270 ) ) | ||
[[serverChat]] ( "Rotation change successful." ) | [[serverChat]] ( "Rotation change successful." ) | ||
end | end |
Revision as of 14:20, 30 March 2006
Description
This function rotates a vehicle around a single point. The function returns a boolean value (true or false) that tells you if it was successful or not.
Syntax
bool SetVehicleRotation ( vehicle vehicle, float rx, float ry, float rz )
Required Arguments
- vehicle: The vehicle that you wish to apply the warp to.
- x: The x-axis rotation in degrees.
- y: The y-axis rotation in degrees.
- z: The z-axis rotation in degrees.
Example
newcar = createVehicle ( 520, 1024, 1024, 1024 ) if ( SetVehicleRotation ( newcar, 0, 0, 270 ) ) serverChat ( "Rotation change successful." ) end