đ Spectro Vehicle Management System - Complete Documentation
Advanced vehicle cleanup and management system for FiveM with automated scheduling, protected zones, and modern UI
đ Table of Contents
đ Key Features
đ Core Functionality
Feature
Description
Command
Remove all abandoned vehicles from server
Remove specific or nearby vehicles
Clean vehicles at preset times
Safe areas where vehicles won't be removed
Modern UI with countdown timers
Audio warnings for players
đĄī¸ Admin Features
Manual identifier-based access
Execute from server console
Track all cleanup actions
đ¨ Visual System
Component
Description
Customizable
Interactive countdown timer
Alert sounds (1 & 2 minutes)
Protected area indicators
đ Requirements and Dependencies
đ¨ Mandatory Dependencies
Dependency
Description
Status
Player permissions (optional)
đ Server Requirements
đ Framework Compatibility
Automatic permission detection
May require modifications
May require modifications
Use admin identifier list
đ§ Installation Guide
Step 1: Download and Setup
Download the script files
IMPORTANT : Rename folder to exactly Spectro_grua
Place in your server's resources
folder
Step 2: Database Setup
Copy -- This script uses ESX tables if framework is enabled
-- No additional database setup required
Step 3: Server Configuration
Copy -- Add to server.cfg
ensure Spectro_grua
Step 4: Initial Configuration
Configure basic settings:
Copy Config.locale = "en" -- Language: "en" or "es"
Config.Cmd = "borrarcoches" -- Main cleanup command
Config.DeleteVehicleTimer = 2 -- Minutes before cleanup
Step 5: Admin Setup
Choose one of two methods:
Option 1: ESX Integration
Copy Config.ESX = true -- Use ESX groups (admin, mod, superadmin)
Option 2: Manual Admin List
Copy Config.ESX = false
Config.AdminList = {
'license:your_license_here',
'discord:your_discord_id',
'steam:your_steam_hex'
}
âī¸ General Configuration
đ¯ Core Settings
Copy Config = {
locale = "en", -- Language (en/es)
Cmd = "borrarcoches", -- Main cleanup command
ESX = true, -- Use ESX permissions
NotificationColor = "#d4ff00", -- UI accent color
DeleteVehicleTimer = 2, -- Warning minutes
EnableBcCommand = true, -- Enable quick cleanup
DefaultRadius = 50.0 -- Default cleanup radius
}
đ Language Settings
Add custom languages in locales.lua
:
Copy Locale["your_lang"] = {
first_message = "Your translation here",
deleted_vehicles = "Your translation here",
-- ... more translations
}
đ¨ Visual Customization
Copy -- Notification color (hex format)
Config.NotificationColor = "#d4ff00" -- Spectro yellow-green
-- UI positioning and styling
-- See style.css for advanced customization
đŽââī¸ Admin Commands
đ¨ Primary Cleanup Command
Copy # Default command
/borrarcoches
# Customizable in config
Config.Cmd = "your_command_here"
Functionality:
Removes all abandoned vehicles
⥠Quick Cleanup Command
Copy # Remove specific vehicle (in or nearby)
/bc
# Remove vehicles in radius
/bc 50 # Remove within 50 meters
/bc 100 # Remove within 100 meters
Detection Priority:
Vehicle player is currently in
Vehicle directly in front of player
Nearest vehicle within range
đģ Console Access
All commands work from server console:
Copy # Server console
borrarcoches
bc 100
â° Automatic Scheduling
đ
Scheduled Cleanups
Configure automatic cleanup times:
Copy Config.DeleteVehiclesAt = {
{['h'] = 01, ['m'] = 00}, -- 1:00 AM
{['h'] = 03, ['m'] = 00}, -- 3:00 AM
{['h'] = 05, ['m'] = 00}, -- 5:00 AM
{['h'] = 07, ['m'] = 00}, -- 7:00 AM
{['h'] = 09, ['m'] = 00}, -- 9:00 AM
{['h'] = 11, ['m'] = 00}, -- 11:00 AM
{['h'] = 13, ['m'] = 00}, -- 1:00 PM
{['h'] = 15, ['m'] = 00}, -- 3:00 PM
{['h'] = 17, ['m'] = 00}, -- 5:00 PM
{['h'] = 19, ['m'] = 00}, -- 7:00 PM
{['h'] = 21, ['m'] = 00}, -- 9:00 PM
{['h'] = 23, ['m'] = 00}, -- 11:00 PM
}
âąī¸ Countdown Timer
Copy Config.DeleteVehicleTimer = 2 -- Minutes before cleanup
// Countdown stages:
// 2 minutes: Initial warning + UI
// 1 minute: Second warning + sound
// 30 seconds: Final countdown + sound
// 0 seconds: Cleanup executed
đĄī¸ Protected Zones
đ Zone Configuration
Copy Config.SafeZones = {
{
['x'] = -44.155, -- X coordinate
['y'] = -1100.155, -- Y coordinate
['z'] = 26.267, -- Z coordinate
['radius'] = 50.0, -- Protection radius
['color'] = 2, -- Blip color
['alpha'] = 150 -- Blip transparency
},
{
['x'] = -1688.438,
['y'] = -1073.625,
['z'] = 13.152,
['radius'] = 200.0,
['color'] = 2,
['alpha'] = 150
}
}
đ¨ Blip Colors
Color ID
Color Name
Hex Code
âī¸ Zone Behavior
Copy Config.DeleteVehiclesIfInSafeZone = false -- Respect safe zones
Config.DeleteVehiclesIfInSafeZone = true // Delete even in safe zones
đĸ Notification System
đ Notification Types
đą ESX Notifications
Copy // Built-in messages with emojis:
"The tow truck will impound all abandoned vehicles in 2 MINUTESđ¨"
"The tow truck will impound all abandoned vehicles in 1 MINUTEđ¨"
"All vehicles have been removed âģī¸"
đĩ Custom Sounds
Place custom sound files in /sounds/
folder:
oneminute.mp3
- Plays at 1-minute mark
twominutes.mp3
- Plays at 2-minute mark
đĨī¸ Visual UI
Modern countdown interface with:
Shake effects for urgency
đ¨ UI Customization
đī¸ Style Configuration
Copy /* Main notification container */
#countdown-container {
left: 1.2vw; /* Horizontal position */
bottom: 27vh; /* Vertical position */
width: 15vw; /* Responsive width */
min-width: 240px; /* Minimum width */
max-width: 300px; /* Maximum width */
}
/* Color customization */
.title {
color: #FFC800; /* Title color */
}
.counter-circle {
border-color: rgba(255, 196, 0, 0.7); /* Border color */
}
đ¯ Position Adjustments
Screen Type
Bottom Position
Notes
đ Color Schemes
Copy // Predefined color schemes:
Config.NotificationColor = "#d4ff00" // Spectro green-yellow
Config.NotificationColor = "#ff0000" // Red (emergency)
Config.NotificationColor = "#00ff00" // Green (success)
Config.NotificationColor = "#0080ff" // Blue (info)
â Frequently Asked Questions
đ§ General Questions
â How do I change the cleanup timer?
Copy // In config.lua:
Config.DeleteVehicleTimer = 2 // Default: 2 minutes
Config.DeleteVehicleTimer = 5 // Extended: 5 minutes
Config.DeleteVehicleTimer = 1 // Quick: 1 minute
â Can I disable automatic cleanup?
Copy // Comment out all times in config.lua:
Config.DeleteVehiclesAt = {
-- {['h'] = 01, ['m'] = 00},
-- All times commented = no automation
}
â How do I add more admin identifiers?
Copy Config.AdminList = {
'license:abc123...',
'discord:123456789',
'steam:110000...',
// Add as many as needed
}
đŽ Gameplay Questions
â Will my vehicle be deleted if I'm inside?
No , the script never deletes vehicles with players inside.
â What about player-owned vehicles?
The script only targets abandoned vehicles. Player ownership detection depends on your framework.
â Can I protect specific areas?
Yes, configure protected zones in Config.SafeZones
:
Copy {
['x'] = coordinate_x,
['y'] = coordinate_y,
['z'] = coordinate_z,
['radius'] = protection_radius,
['color'] = 2,
['alpha'] = 150
}
đ¨ Technical Questions
â Why must the folder be named 'Spectro_grua'?
The script includes integrity checks to prevent unauthorized modifications:
Copy -- Built-in validation
if resourceName ~= "Spectro_grua" then
print("ERROR: Must run with name 'Spectro_grua'")
return
end
â How do I customize the UI position?
Modify style.css
:
Copy #countdown-container {
left: 1.2vw; /* Horizontal */
bottom: 27vh; /* Vertical */
}
â Can I use custom sounds?
Yes, replace files in /sounds/
folder:
Same filenames, any audio format supported by browsers.
đ§ Troubleshooting
đĢ Common Issues
Command not working
Check permissions :
Copy // ESX enabled: Verify admin group
// ESX disabled: Check AdminList
Verify command name :
Copy Config.Cmd = "borrarcoches" // Check spelling
Console errors :
Copy # Look for errors in server console
# Common: script disabled, permission issues
UI not showing
Check resource name :
Copy # Must be exactly: Spectro_grua
# Refresh resources after renaming
Verify file paths :
Copy // Ensure all files are present:
// - html/index.html
// - html/script.js
// - html/style.css
Browser compatibility :
Copy // Clear FiveM cache
// %localappdata%\FiveM\FiveM.app\data\cache
Sounds not playing
Check file formats :
Copy # Supported: .mp3, .wav, .ogg
# Location: /sounds/ folder
Volume settings :
Copy // In script.js:
oneMinuteSound.volume = 1.0;
twoMinutesSound.volume = 1.0;
Browser autoplay policies :
Copy // Sound may require user interaction first
// This is handled automatically in the script
đ Debug Mode
Enable detailed logging:
Copy // Add to config.lua:
Config.Debug = true
// Check console for detailed logs:
// - Command executions
// - UI events
// - Permission checks
đ Advanced Settings
đ ī¸ Advanced Configuration
Copy // Extended configuration options
Config.Advanced = {
-- Vehicle detection settings
MaxDetectionRange = 500.0, -- Max vehicle scan distance
MinPlayerDistance = 5.0, -- Min distance for player detection
-- Performance settings
CleanupThreadDelay = 100, -- Milliseconds between checks
MaxVehiclesPerTick = 5, -- Vehicles processed per tick
-- Safety settings
RequireGroundContact = true, -- Only delete grounded vehicles
IgnoreEmergencyVehicles = true, -- Skip police/ambulance
-- Notification settings
DisableESXNotifications = false, -- Use only custom UI
CustomSoundVolume = 0.8, -- Sound effect volume
UIFadeTime = 500, -- UI transition time (ms)
-- Zone settings
AutoGenerateZoneBlips = true, -- Show zone boundaries
ZoneCheckFrequency = 1000, -- Zone check interval (ms)
}
đĄ Custom Events
Copy // Custom event triggers for integration
TriggerEvent('spectro:vehicleCleanup:started')
TriggerEvent('spectro:vehicleCleanup:warning', minutesLeft)
TriggerEvent('spectro:vehicleCleanup:completed', vehicleCount)
// Listen for custom events
AddEventHandler('spectro:vehicleCleanup:started', function()
// Custom actions when cleanup starts
end)
đ API Integration
Copy // Server-side exports
exports['Spectro_grua']:StartCleanup()
exports['Spectro_grua']:QuickCleanup(playerId, radius)
exports['Spectro_grua']:AddProtectedZone(coords, radius)
exports['Spectro_grua']:RemoveProtectedZone(coords)
// Usage example:
local success = exports['Spectro_grua']:StartCleanup()
if success then
print("Cleanup initiated successfully")
end
đ¨ Theme Presets
Copy // Predefined UI themes
Config.UIThemes = {
default = {
primaryColor = "#d4ff00",
backgroundColor = "rgba(12, 12, 12, 0.95)",
borderColor = "rgba(255, 196, 0, 0.3)"
},
emergency = {
primaryColor = "#ff0000",
backgroundColor = "rgba(20, 0, 0, 0.95)",
borderColor = "rgba(255, 0, 0, 0.5)"
},
police = {
primaryColor = "#0080ff",
backgroundColor = "rgba(0, 10, 20, 0.95)",
borderColor = "rgba(0, 128, 255, 0.4)"
}
}
// Apply theme
Config.ActiveTheme = "default"
đ Required Support Data
When requesting support, provide:
Server Information :
Framework (ESX/standalone)
Resource name confirmation
Error Details :
Console logs (client & server)
đ Self-Diagnosis Checklist
Copy # Pre-support checklist:
[ ] Resource name is exactly 'Spectro_grua'
[ ] All files are present and unmodified
[ ] ESX permissions are correctly set
[ ] Admin identifiers are properly formatted
[ ] No conflicting resources are running
[ ] Console shows no red errors
[ ] UI files (HTML/CSS/JS) are intact
đ Final Notes
đ Update Process
Backup current configuration
Replace script files (keep config.lua)
Check version notes for changes
Test in development server first
Apply to production server
This script is copyrighted material:
Licensed for single-server use
Modification of core files prohibited
Resource name change prohibited
Redistribution prohibited
đĄī¸ Security Notice
The script includes integrity checks:
File structure validation
These protect against unauthorized modifications and ensure proper functionality.
Documentation for Spectro Vehicle Management System v1.2.0 Last updated: 2025