getVehicleIdleRespawnDelay | Multi Theft Auto: Wiki Skip to content

getVehicleIdleRespawnDelay

Client-side
Server-side
Shared

Pair: setVehicleIdleRespawnDelay

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 at its position while empty.

OOP Syntax Help! I don't understand this!

  • Method:vehicle:getIdleRespawnDelay(...)
  • Variable: .idleRespawnDelay

Syntax

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

Returns

  • int: value

Returns the delay in milliseconds.

Code Examples

shared

This example gets the idle 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 = getVehicleIdleRespawnDelay(veh)
outputChatBox('Idle vehicle delay: '..delay..'ms', player)
end)

See Also

Vehicle Functions