SetVehicleRotation
Jump to navigation
Jump to search
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, #2421 --Norby89 09:17, 5 August 2007 (CDT) |
This function is deprecated. This means that its use is discouraged and that it might not exist in future versions, but there should be a more generic way to perform what it does. | |
Please use setElementRotation
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
- addVehicleUpgrade
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
- getTrainTrack
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleController
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleModelFromName
- getVehicleName
- getVehicleNameFromModel
- getVehicleOccupant
- getVehicleOccupants
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehiclePlateText
- getVehicleSirenParams
- getVehicleSirens
- getVehicleSirensOn
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgradeSlotName
- getVehicleUpgrades
- getVehicleVariant
- getVehicleWheelStates
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleOnGround
- isVehicleTaxiLightOn
- removeVehicleUpgrade
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainPosition
- setTrainSpeed
- setTrainTrack
- setVehicleColor
- setVehicleDamageProof
- setVehicleDoorOpenRatio
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleHandling
- setVehicleHeadLightColor
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehiclePlateText
- setVehicleSirens
- setVehicleSirensOn
- setVehicleTaxiLightOn
- setVehicleTurretPosition
- setVehicleVariant
- setVehicleWheelStates