SetVehicleRespawnPosition
From Multi Theft Auto: Wiki
This function sets the position (and rotation) the vehicle will respawn to.
Syntax
bool setVehicleRespawnPosition ( vehicle theVehicle, float x, float y, float z [, float rx, float ry, float rz ] )
OOP Syntax Help! I don't understand this!
- Method: vehicle:setRespawnPosition(...)
- Variable: .respawnPosition
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 might need to 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
FROM VERSION 1.5.7 r19626 ONWARDS
- attachTrailerToVehicle
- blowVehicle
- createVehicle
- detachTrailerFromVehicle
- fixVehicle
- getModelHandling
- getOriginalHandling
- getTrainDirection
- getTrainPosition
- getTrainSpeed
FROM VERSION 1.6 r7485 ONWARDS
- getVehicleColor
- getVehicleCompatibleUpgrades
- getVehicleController
- getVehicleDoorOpenRatio
- getVehicleDoorState
- getVehicleEngineState
- getVehicleHandling
- getVehicleHeadLightColor
- getVehicleLandingGearDown
- getVehicleLightState
- getVehicleMaxPassengers
- getVehicleModelFromName
- getVehicleName
- getVehicleNameFromModel
- getVehicleOccupant
- getVehicleOccupants
- getVehicleOverrideLights
- getVehiclePaintjob
- getVehiclePanelState
- getVehiclePlateText
- getVehicleRespawnPosition
- getVehicleRespawnRotation
- getVehicleSirenParams
- getVehicleSirens
- getVehicleSirensOn
- getVehicleTowedByVehicle
- getVehicleTowingVehicle
- getVehicleTurretPosition
- getVehicleType
- getVehicleUpgradeOnSlot
- getVehicleUpgradeSlotName
- getVehicleUpgrades
- getVehicleVariant
- getVehicleWheelStates
- getVehiclesOfType
- isTrainDerailable
- isTrainDerailed
- isVehicleBlown
- isVehicleDamageProof
- isVehicleFuelTankExplodable
- isVehicleLocked
- isVehicleOnGround
- isVehicleTaxiLightOn
- removeVehicleSirens
- removeVehicleUpgrade
- resetVehicleExplosionTime
- resetVehicleIdleTime
- respawnVehicle
- setModelHandling
- setTrainDerailable
- setTrainDerailed
- setTrainDirection
- setTrainPosition
- setTrainSpeed
FROM VERSION 1.6 r7485 ONWARDS
- setVehicleColor
- setVehicleDamageProof
- setVehicleDoorOpenRatio
- setVehicleDoorState
- setVehicleDoorsUndamageable
- setVehicleEngineState
- setVehicleFuelTankExplodable
- setVehicleHandling
- setVehicleHeadLightColor
- setVehicleIdleRespawnDelay
- setVehicleLandingGearDown
- setVehicleLightState
- setVehicleLocked
- setVehicleOverrideLights
- setVehiclePaintjob
- setVehiclePanelState
- setVehiclePlateText
- setVehicleRespawnDelay
- setVehicleRespawnPosition
- setVehicleRespawnRotation
- setVehicleSirens
- setVehicleSirensOn
- setVehicleTaxiLightOn
- setVehicleTurretPosition