- Documentation
- Server functions
- resetVehicleIdleTime
Function
resetVehicleIdleTime
Resets the vehicle's idle counter, as if someone had just got out. The countdown to returning an abandoned vehicle (setVehicleIdleRespawnDelay) starts again. Useful e.g. when a player has parked the car in a garage and you want to give them more time.
Syntax
bool resetVehicleIdleTime(vehicle vehicle)Arguments
vehiclevehicle- The vehicle.
Returns
true on success.
Example
addCommandHandler("przedluz", function(player)
local vehicle = getPedOccupiedVehicle(player) or getElementData(player, "ostatnieAuto")
if vehicle and isElement(vehicle) then resetVehicleIdleTime(vehicle) end
end)