SetVehicleRotation

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.

Emblem-important.png This function is deprecated. This means that its use is discouraged and that it might not exist in future versions.

Please use setElementRotation instead.


This function rotates a vehicle around a single point.

Syntax

bool setVehicleRotation ( vehicle theVehicle, rx, ry, rz )

Required Arguments

  • theVehicle: 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.

Returns

Returns a boolean value true or false that tells you if it was successful or not.

Example

local newcar = createVehicle ( 520, 1024, 1024, 1024 ) 
if setVehicleRotation ( newcar, 0, 0, 270 ) then
    outputChatBox ( "Rotation change successful." )
end

See Also