getVehicleRespawnDelay | Multi Theft Auto: Wiki Skip to content

getVehicleRespawnDelay

Client-side
Server-side
Shared

Pair: setVehicleRespawnDelay

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function gets the time delay (in milliseconds) the vehicle will remain wrecked before respawning.

OOP Syntax Help! I don't understand this!

  • Method:vehicle:getRespawnDelay(...)
  • Variable: .respawnDelay

Syntax

int getVehicleRespawnDelay ( vehicle theVehicle )
Required Arguments
  • theVehicle: The vehicle you wish to get the respawn delay of.

Returns

  • int: value

Returns the delay in milliseconds.

Code Examples

shared

This example gets the delay of a current occupying vehicle.

addCommandHandler("getVehicleDelay", function(player)
local veh = getPedOccupiedVehicle(player)
if not veh then
outputChatBox('You must be in a vehicle!', player)
return
end
local delay = getVehicleRespawnDelay(veh)
outputChatBox('Vehicle delay: '..delay..'ms', player)
end)

See Also

Vehicle Functions