SetVehicleRotation: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Needs Checking|the server side function seems to work counter clockwise meaning setting the rotation to (0 0 90) will make the vehicle face West serverside and East clentside, also serverside 0 rotation is displayed as 360 no biggie though --[[User:Norby89|Norby89]] 09:17, 5 August 2007 (CDT)}}
{{Server client function}}
{{Server client function}}
This function rotates a vehicle around a single point.  
This function rotates a vehicle around a single point.  

Revision as of 14:17, 5 August 2007


Dialog-information.png This article needs checking.

Reason(s): the server side function seems to work counter clockwise meaning setting the rotation to (0 0 90) will make the vehicle face West serverside and East clentside, also serverside 0 rotation is displayed as 360 no biggie though --Norby89 09:17, 5 August 2007 (CDT)

This function rotates a vehicle around a single point.

Syntax

bool setVehicleRotation ( vehicle, rx, ry, 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.

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