Vehicle.IdleRespawnTime
From Liberty Unleashed Wiki
This Vehicle class member returns or sets the idle respawn time of the given vehicle as seconds. If the vehicle is unused longer than this time limit indicates, it will respawn.
Syntax
You can either return or set a new value using this member:
int Vehicle.IdleRespawnTime
Vehicle.IdleRespawnTime = int iTime
Arguments
- iTime - This is the new idle respawn time for the vehicle
Example 1. Returning
This command will return the idle respawn time of the vehicle the player is driving.
function onPlayerCommand( player, cmd, text ) { if ( cmd == "vehidlerespawntime" ) { if ( player.Vehicle ) MessagePlayer( "Your vehicles idle respawn time is: " + player.Vehicle.IdleRespawnTime, player ); } return 1; }
Notes
The function MessagePlayer and call onPlayerCommand were used in in this example. More info about them in the corresponding pages.
Example 2. Setting
This command will set the idle respawn time of the vehicle the player is driving to 5 minutes.
function onPlayerCommand( player, cmd, text ) { if ( cmd == "setvehidle" ) { if ( player.Vehicle ) player.Vehicle.IdleRespawnTime = 300; } return 1; }
Notes
The function MessagePlayer and call onPlayerCommand were used in in this example. More info about them in the corresponding pages.
Related Functions
- CreateVehicle
- FindVehicle
- GetClosestVehicle
- GetVehicleCount
- GetVehicleHandlingData
- GetVehicleIDFromName
- GetVehicleName
- SetVehicleHandlingData
- Vehicle.Alpha
- Vehicle.Angle
- Vehicle.Colour1
- Vehicle.Colour2
- Vehicle.Driver
- Vehicle.EngineDamage
- Vehicle.Explode
- Vehicle.Fix
- Vehicle.GetAddon
- Vehicle.GetPassenger
- Vehicle.GetHandlingData
- Vehicle.GetWheelStatus
- Vehicle.Health
- Vehicle.ID
- Vehicle.IdleRespawnTime
- Vehicle.IdleTime
- Vehicle.LightState
- Vehicle.Locked
- Vehicle.Marker
- Vehicle.MarkerScale
- Vehicle.MarkerSprite
- Vehicle.Model
- Vehicle.OneTime
- Vehicle.PassengerCount
- Vehicle.Pos
- Vehicle.Remove
- Vehicle.Respawn
- Vehicle.RespawnTime
- Vehicle.RGBColour1
- Vehicle.RGBColour2
- Vehicle.SetHandlingData
- Vehicle.SetWheelStatus
- Vehicle.SpawnAngle
- Vehicle.SpawnPos
- Vehicle.SetAddon
- Vehicle.SetEngineState
- Vehicle.SetRadio
- Vehicle.Siren
- Vehicle.SirenLight
- Vehicle.TaxiLight
- Vehicle.Velocity
- Vehicle.VirtualWorld
- Vehicle.Wrecked