Auto DV that periodically clears empty vehicles on a timer or manually via /autodv.
Built for ESX, notifications with ox_lib. Ported & maintained by sweet21 (Discord: sweet21). Enjoy! ![]()
Preview:
Features
Timed cleanup (configurable interval)
Manual command: /autodv
ox_lib notifications (countdown + results)
Two cleanup modes:
- Aggressive: enumerates vehicles, requests network control, deletes mission/owned entities (if empty)
- Simple:
ClearAreaOfVehicles(fast, less thorough)
Safety: skip vehicles with a driver; optional safe radius around players
ESX-friendly; no QBCore dependency
Requirements
- ESX (es_extended)
- ox_lib (ensure it starts before this resource)
Installation
- Drop the resource folder into your
resources/ - Add to
server.cfgin this order:
ensure ox_lib
ensure autodv_esx # or your folder name
- Example
fxmanifest.lua:
fx_version 'cerulean'
game 'gta5'
description 'Auto DV (ESX + ox_lib)'
version '1.0.0'
lua54 'yes'
shared_script '@ox_lib/init.lua'
dependency 'ox_lib'
client_scripts { 'Client/client.lua' }
server_scripts { 'Server/server.lua' }
Configuration (quick toggles inside Client/client.lua)
local DELETE_NEAR_PLAYER_RADIUS = 8.0 -- donβt delete if a player is within X meters
local SKIP_VEHICLES_WITH_DRIVER = true -- skip vehicles with driver (NPC/player)
local USE_AGGRESSIVE_DELETE = true -- true = enumerate & force delete; false = ClearAreaOfVehicles
Timer & countdown (in Server/server.lua):
-- Example
Citizen.Wait(10800000) -- interval in ms (3h)
countdownAlert(5) -- minutes before cleanup
Commands
/autodvβ triggers the 5-minute countdown (configurable) and then cleans up
Optional permission check for ESX admins/mods is included (commented). Uncomment to restrict.
How it works (short)
- Server announces countdown via ox_lib notifications
- Client receives clear event
- Aggressive mode: iterates
CVehiclepool, requests network control, marks mission entity, deletes empty vehicles; respects safe radius and βskip driverβ flag
Notes & FAQ
- Does it delete owned/garage vehicles?
This removes world entities. Your vehicle ownership in the database is unaffected. If you pull your car out and leave it outside, the entity can be deleted by Auto DV; you can spawn it again from the garage. - It didnβt delete some freshly spawned cars. Why?
Simple mode often skips mission/owned entities. Use Aggressive mode (default here) which requests control and deletes them if empty. - Delete cars with NPC drivers too?
SetSKIP_VEHICLES_WITH_DRIVER = false(beware: this will remove traffic in motion).
Download
- GitHub Release: GitHub - XffJoaco11/Release-Auto-DV-Timer-autodv-ESX-ox_lib-FREE: Its free to use, just enjoy!
Credits
- Original base: Auto DV (QBCore)
- ESX + ox_lib port & edits: sweet21
License
- Free to use. If the original base has a specific license, please respect it when redistributing.
