DMD Store Clear Entities | Server Cleanup System | QB ESX
DMD-ClearEntities
Advanced entity cleanup system to maintain server performance and prevent entity overflow.
Automatically clears abandoned vehicles, dropped weapons, dead peds, and other entities that cause server lag. Features intelligent scheduling, configurable intervals, and comprehensive entity filtering.
Essential for maintaining server performance on high-traffic servers.
----------------------------------------------------------------
FEATURES
Entity Cleanup Categories
• Vehicles - Abandoned cars, bikes, boats, aircraft
• Peds - Dead NPCs, AI characters
• Objects - Dropped items, props, debris
• Weapons - Dropped firearms on ground
• Pickups - Money bags, item pickups
Intelligent Scheduling
• Configurable cleanup intervals
• Server startup auto-clear
• Manual admin commands
• Scheduled automatic cleanup
• Resource restart triggers
Smart Filtering
• Player proximity detection
• Owned vehicle protection
• Job vehicle exemptions
• Whitelist system for specific models
• Distance-based cleanup
Full Configuration
Config = {
ClearInterval = 30, -- Minutes between cleanups
ClearOnStartup = true,
ProtectPlayerVehicles = true,
MinimumDistance = 100.0, -- Distance from players
EnableVehicleCleanup = true,
EnablePedCleanup = true,
EnableObjectCleanup = true,
EnableWeaponCleanup = true,
}
Performance Monitoring
• Entity count logging
• Cleanup statistics
• Console notifications
• Discord webhook support
• Performance metrics
----------------------------------------------------------------
CLEANUP METHODS
Automatic Cleanup
Runs every X minutes (configurable):
Config.ClearInterval = 30 -- Every 30 minutes
Manual Commands
/clearall - Clear all entities now (Admin only)
/clearvehicles - Clear vehicles only
/clearpeds - Clear dead peds
/clearobjects - Clear objects
Startup Cleanup
Config.ClearOnStartup = true -- Clear on resource start
----------------------------------------------------------------
PROTECTION SYSTEM
Player Vehicles
- Owned vehicles never deleted
- Player proximity protection
- Vehicle occupancy check
Job Vehicles
ProtectedJobs = {"police", "ambulance", "mechanic"}
Model Whitelist
WhitelistedModels = {
"police", "ambulance", "firetruck"
}
----------------------------------------------------------------
NOTIFICATIONS
Admin notifications:
Entity cleanup completed:
- Vehicles: 45 removed
- Peds: 123 removed
- Objects: 67 removed
- Total: 235 entities cleared
----------------------------------------------------------------
COMPATIBILITY
• Frameworks: QBCore, ESX, Standalone
• Admin Systems: All compatible
• Vehicle Systems: Compatible with all ownership systems
• Database: OXMySQL support
----------------------------------------------------------------
SECURITY
Protected by DMD-LIB security system:
- Script name verification
- Dependency validation
- Anti-leak protection
----------------------------------------------------------------
PERFORMANCE IMPACT
- Before Cleanup: High entity count causes lag
- After Cleanup: Smooth performance restored
- Server Load: Reduced by up to 40%
- FPS Improvement: +10-20 FPS average
----------------------------------------------------------------
INSTALLATION
1. Ensure "dmd-lib" and "ox_lib" are installed
2. Extract "dmd-clearintities" to resources
3. Add to server.cfg:
ensure ox_lib
ensure dmd-lib
ensure dmd-clearintities
4. Configure cleanup settings in config.lua
5. Restart server
----------------------------------------------------------------
DMD Store - Professional FiveM Resources