ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setVehicleRespawnDelay

Function

setVehicleRespawnDelay

ServerVehiclesIdentical to MTA:SA

Sets how many milliseconds after destruction a vehicle's wreck respawns at its respawn point. The default is 10000 ms (10 s). Only works with respawning enabled (toggleVehicleRespawn). The new time applies to later explosions; for a wreck already waiting use resetVehicleExplosionTime.

Syntax

bool setVehicleRespawnDelay(vehicle vehicle, int ms)

Arguments

vehiclevehicle
The vehicle.
msint
Time in milliseconds (0 or more).

Returns

true on success.

Example

local taxi = createVehicle(420, 1780, -1890, 13.4)
toggleVehicleRespawn(taxi, true)
setVehicleRespawnDelay(taxi, 30000)

See also