cz_vehiclecleanup is a lightweight vehicle cleanup system for FiveM that automatically removes unused vehicles and allows players to protect their vehicles with a simple command. Fully configurable, with support for ESX, QBCore, and standalone frameworks.
- 🚗 Automatic Vehicle Cleanup: Removes unoccupied vehicles at configurable intervals.
- 🛡️ Do Not Remove Command: Players can protect their vehicles from the next cleanup using
/donotremove [plate]. - ⏱️ Customizable Warnings: Send notifications at any number of minutes before cleanup (e.g., 10, 5, 1 minute).
- 🔧 Command Permissions & Delay: Control who can use
/forcevehremoveor/donotremoveand set cooldowns. - 🌐 Framework Detection: Automatically detects ESX, QBCore, or standalone.
- 📢 Built-in Notifications: Uses internal notification function, no external dependency required.
- 🕊️ Lightweight & Efficient: Optimized to run without lag, handles many vehicles safely.
- ✅ Standalone
- 📦 ESX
- 📢 QB-CORE
-
Place the
cz_vehiclecleanupresource in yourresourcesdirectory. -
Add to
server.cfg:
ensure cz_vehiclecleanup| Command | Description | Permission | Cooldown (ms) |
|---|---|---|---|
/forcevehremove |
Forces immediate cleanup of all eligible vehicles | Configurable | Configurable |
/donotremove [plate] |
Protect your vehicle from the next cleanup | Configurable | Configurable |
/donotremoveautomatically detects the plate of the vehicle you're in if you don’t specify one.
Key config options are located in config.lua:
Config.IntervalMinutes = 30 -- How often cleanup runs
Config.Warnings = {
[10] = "Vehicles will be removed in 10 minutes.",
[5] = "Vehicles will be removed in 5 minutes.",
[1] = "Vehicles will be removed in 1 minute."
}
Config.Commands = {
ForceCleanup = "forcevehremove",
DoNotRemove = "donotremove"
}
Config.Permissions = {
ForceCleanup = "admin", -- empty = anyone
DoNotRemove = ""
}
Config.CommandDelay = 5000 -- Cooldown for commands
Config.NotifyTitle = "Vehicles"- You can add/remove warning minutes freely using
Config.Warnings. - Permissions are configurable per command. Empty = accessible to all players.
- Force cleanup from server or admin scripts:
TriggerEvent("cz_vehiclecleanup:forceCleanup")- Add a plate to ignore list programmatically:
TriggerEvent("cz_vehiclecleanup:addIgnorePlate", "ABC123")- If a player uses
/donotremovein a vehicle, the vehicle’s plate is automatically detected. - If the player is not in a vehicle, they must provide the plate manually.
This project is open source for learning, modifying, and use on servers.
- Use it in private/public servers.
- Modify it for your own needs.
- Share improvements with credit.
- Sell this resource (original or modified).
- Re-upload and claim authorship.
- Remove original author credit.
Author: Czmenz