Scheduled unoccupied-vehicle cleanup for FiveM / ESX. Runs every hour within a configurable time window, warns players 5 minutes ahead, skips vehicles with players inside or nearby, batches deletions for server stability, and forwards owned vehicles to your garage / impound system via a hook.Documentation Index
Fetch the complete documentation index at: https://docs.apex-services.site/llms.txt
Use this file to discover all available pages before exploring further.
Features
- Hourly auto-cleanup within a configurable local-time window (wraps across midnight)
- 5-minute player warning before the sweep fires
- Skips occupied + nearby vehicles (30m radius, configurable)
- Batched deletions — 50 vehicles per batch, 500ms between, never hangs the tick
- Owned vehicle forwarding — hook-based
ImpoundOwnedVehicleskeepsowned_vehiclesintact - Manual commands —
/clearvehicles+/quickclear(10-sec warning) - AdvancedParking / qbx_vehiclegarages friendly via
BeforeEntityDelete - en/de localization with real umlauts
Requirements
Required
es_extended, ox_lib, oxmysqlOptional
Garage / impound resource (via
Hooks.ImpoundOwnedVehicles), AdvancedParking / qbx_vehiclegarages (via Hooks.BeforeEntityDelete)Configuration
config.lua
Hooks
See Hooks reference / Carclear. Key hooks:Hooks.ImpoundOwnedVehicles, Hooks.BeforeEntityDelete, Hooks.NotifyAll, Hooks.OnAuditLog.
Resource info
Code accessible:
config.lua, hooks.lua, locales/*. Approximately 600 lines of Lua. English + German.