SetVehicleRespawnPosition
From Multi Theft Auto: Wiki
This function sets the position (and rotation) the vehicle will respawn to.
Syntax
Required Arguments
- theVehicle: The vehicle you wish to change the respawn position of.
- x: A floating point number representing the X coordinate on the map.
- y: A floating point number representing the Y coordinate on the map.
- z: A floating point number representing the Z coordinate on the map.
Optional Arguments
NOTE: When using optional arguments, you must supply all arguments before the one you wish to use. For more information on optional arguments, see Optional Arguments.
- rx: A floating point number representing the rotation about the X axis in Degrees.
- ry: A floating point number representing the rotation about the Y axis in Degrees.
- rz: A floating point number representing the rotation about the Z axis in Degrees.
Returns
Returns true if the vehicle was found and edited, false otherwise.
Example
This example creates a vehicle and changes its respawn position.
local vehicle = createVehicle ( 400, 1, 1, 1 ) -- create us a new vehicle if ( vehicle ) then setVehicleRespawnPosition ( vehicle, 10, 10, 10 ) -- tell the server to respawn the vehicle at position (10,10,10) end
See Also
- addVehicleUpgrade
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleController
- getVehicleDoorState
- getVehicleEngineState
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleName
- getVehicleOccupant
- getVehicleOccupants
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehicleSirensOn
- getVehiclesOfType
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurnVelocity
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgrades
- getVehicleUpgradeSlotName
- getVehicleWheelStates
- getVehicleDoorOpenRatio
- getVehicleHandling
- getModelHandling
- getOriginalHandling
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleOnGround
- removeVehicleUpgrade
- resetVehicleExplosionTime
- resetVehicleIdleTime
- respawnVehicle
- setVehicleColor
- setVehicleDamageProof
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleIdleRespawnDelay
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehicleRespawnDelay
- setVehicleRespawnPosition
- setVehicleSirensOn
- setVehicleTurretPosition
- setVehicleDoorOpenRatio
- setVehicleHandling
- setModelHandling
- setVehicleTurnVelocity
- setVehicleWheelStates
- spawnVehicle
- toggleVehicleRespawn
- getTrainDirection
- getTrainSpeed
- getVehicleHeadLightColor
- getVehicleModelFromName
- getVehicleNameFromModel
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleTaxiLightOn
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainSpeed
- setVehicleHeadLightColor
- setVehicleTaxiLightOn
- getVehicleVariant
- setVehicleVariant
- getVehicleSirenParams
- removeVehicleSirens
- getVehicleSirens
- addVehicleSirens‎
- setVehicleSirens