SetVehicleRespawnRotation: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server function}} {{New feature/item|3.0156|1.5.5|14280| This function sets the rotation the vehicle will respawn to. }} ==Syntax== <syntaxhighlight lang="lua">bo...") |
m (→See Also) |
||
(One intermediate revision by one other user not shown) | |||
Line 10: | Line 10: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theVehicle''': The [[vehicle]] you wish to change the respawn position of. | *'''theVehicle''': The [[vehicle]] you wish to change the respawn position of. | ||
* '''rx''': A [[float]] representing the rotation about the X axis in | * '''rx''': A [[float]] representing the rotation about the X axis in degrees. | ||
* '''ry''': A [[float]] representing the rotation about the Y axis in | * '''ry''': A [[float]] representing the rotation about the Y axis in degrees. | ||
* '''rz''': A [[float]] representing the rotation about the Z axis in | * '''rz''': A [[float]] representing the rotation about the Z axis in degrees. | ||
==Returns== | ==Returns== | ||
Line 27: | Line 27: | ||
==See Also== | ==See Also== | ||
{{ | {{Vehicle_functions|server}} |
Latest revision as of 23:05, 6 September 2024
This function sets the rotation the vehicle will respawn to.
Syntax
bool setVehicleRespawnRotation ( vehicle theVehicle, float rx, float ry, float rz )
OOP Syntax Help! I don't understand this!
- Method: vehicle:setRespawnRotation(...)
- Variable: .respawnRotation
Required Arguments
- theVehicle: The vehicle you wish to change the respawn position of.
- rx: A float representing the rotation about the X axis in degrees.
- ry: A float representing the rotation about the Y axis in degrees.
- rz: A float representing the rotation about the Z axis in degrees.
Returns
Returns true if the vehicle respawn rotation was set successfully, false otherwise.
Example
This example creates a vehicle and changes its respawn rotation.
local vehicle = createVehicle ( 400, 1, 1, 1 ) -- create us a new vehicle if ( vehicle ) then setVehicleRespawnRotation ( vehicle, 10, 10, 10 ) -- tell the server to respawn the vehicle with rotation (10,10,10) end
See Also
- addVehicleSirens
- getModelHandling
- getVehicleIdleRespawnDelay
- getVehicleRespawnDelay
- getVehicleRespawnPosition
- getVehicleRespawnRotation
- getVehiclesOfType
- isVehicleRespawnable
- removeVehicleSirens
- resetVehicleExplosionTime
- resetVehicleIdleTime
- respawnVehicle
- setModelHandling
- setVehicleIdleRespawnDelay
- setVehicleRespawnDelay
- setVehicleRespawnPosition
- setVehicleRespawnRotation
- spawnVehicle
- toggleVehicleRespawn
- Shared
- 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