SetVehicleRotation: Difference between revisions
Jump to navigation
Jump to search
(→Syntax) |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | |||
This function rotates a vehicle around a single point. | This function rotates a vehicle around a single point. | ||
Line 16: | Line 16: | ||
==Example== | ==Example== | ||
<section name="Server and Client" class="both" show="true"> | |||
<syntaxhighlight lang="lua">local newcar = createVehicle ( 520, 1024, 1024, 1024 ) | <syntaxhighlight lang="lua">local newcar = createVehicle ( 520, 1024, 1024, 1024 ) | ||
if ( setVehicleRotation ( newcar, 0, 0, 270 ) ) then | if ( setVehicleRotation ( newcar, 0, 0, 270 ) ) then | ||
outputChatBox ( "Rotation change successful." ) | outputChatBox ( "Rotation change successful." ) | ||
end</syntaxhighlight> | end</syntaxhighlight> | ||
</section> | |||
==See Also== | ==See Also== | ||
{{Vehicle functions}} | {{Vehicle functions}} |
Revision as of 15:55, 4 August 2007
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
Click to collapse [-]
Server and Clientlocal 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