A next-generation FiveM script that automatically configures everything for emergency vehicle modifications across all major frameworks. No manual setup required - just install and it works!
- โ Framework Detection - Automatically detects ESX, QBCore, QBox, or Standalone
- โ Zone Configuration - Pre-configured with 11+ emergency service locations
- โ Job Integration - Automatic job-based access control with Grade 4+ restrictions
- โ Database Setup - Auto-creates tables and handles all database operations
- โ Vehicle Detection - Smart emergency vehicle detection using multiple methods
- Zone-Specific Requirements - Each location requires specific jobs and grades
- Real-Time Validation - Direct framework integration + database polling fallback
- Smart Caching - ox_lib integration with performance optimization
- Grade Restrictions - Minimum Grade 4+ for all emergency services by default
Police Stations (Police Grade 4+)
- Mission Row Police Department
- Davis Sheriff Station
- Sandy Shores Sheriff Office
- Paleto Bay Sheriff Office
- Vespucci Police Station
Fire Stations (Fire Grade 4+)
- Los Santos Fire Station 1
- Davis Fire Station
- Paleto Bay Fire Station
- Sandy Shores Fire Station
Medical Centers (Ambulance Grade 4+)
- Pillbox Hill Medical Center
- Sandy Shores Medical Center
- Download and extract to your
resourcesfolder - Install dependencies:
ox_libandoxmysql - Add to
server.cfg:ensure ox_lib ensure oxmysql ensure EmergencyVehicleMenu - That's it! - No configuration needed
- โ Works immediately with any framework (ESX, QBCore, QBox, Standalone)
- โ All major emergency service locations pre-configured
- โ Job-based access control automatically enabled
- โ Emergency vehicle detection works out of the box
- โ Database tables created automatically
Want to customize? The system supports full manual override:
Config.ManualFramework = true
Config.Framework = 'esx' -- Force specific frameworkConfig.ManualZones = true
Config.ManualModificationZones = {
{
name = "LSPD Headquarters",
coords = vector3(454.6, -1017.4, 28.4),
radius = 30.0,
type = "police",
requiredJob = "police", -- Job requirement
minGrade = 6, -- Lieutenant+ only
jobLabel = "Police Lieutenant"
}
}Config.ManualVehicleDetection = true
Config.ManualEmergencyVehicles = {
"ambulance", "firetruk", "police",
"my_custom_police_car", -- Your custom vehicles
"custom_ambulance"
}- ESX - Full job integration with police/ambulance/fire restrictions
- QBCore/QBX - Complete job system support with grade checking
- QBox - Full compatibility with job validation
- Standalone - Location-only restrictions for non-framework servers
- Standard Liveries - All default vehicle liveries
- Custom YFT Liveries - Support for custom streamed liveries
- Performance Upgrades - Engine, brakes, transmission, suspension, armor, turbo
- Appearance Customization - Colors, wheels, window tints, neon lights
- Vehicle Extras - Toggle up to 20 vehicle extras
- Door Controls - Individual door, hood, and trunk control
- Emergency Repair - Partial repair system for disabled vehicles
- Full Repair - Complete restoration at designated locations
- Intuitive UI - Clean ox_lib menu system with status indicators
- Visual Indicators - Map blips and ground markers for all locations
- Smart Notifications - Detailed access feedback with job requirements
- Search Functionality - Quick livery search and filtering
- Configuration Saving - Save and auto-apply favorite vehicle setups
- Real-Time Checking - Direct framework object integration
- Database Fallback - Automatic database polling for offline validation
- Smart Caching - Performance-optimized with ox_lib cache integration
- Multi-Layer Security - SQL injection protection and permission validation
- Police Stations - Police job, Grade 4+ (Officer level)
- Fire Stations - Fire job, Grade 4+ (Firefighter level)
- Medical Centers - Ambulance job, Grade 4+ (EMS level)
- Custom Grades - Fully configurable per-zone requirements
Automatically handles job variations:
- Police:
police,lspd,bcso,sahp,sheriff - Fire:
fire,lsfd,firefighter - Ambulance:
ambulance,ems,medical
- ESX -
users,jobs,job_gradestables with Steam identifiers - QBCore -
playerstable with JSON job columns and license identifiers - QBox -
playerstable with direct job/grade columns
- Async Queries - Non-blocking database operations
- Query Caching - 5-minute cache lifetime with automatic cleanup
- Connection Pooling - Efficient oxmysql integration
- Fallback Safety - Graceful degradation on database errors
/modveh- Open modification menu (in designated zones)F7- Default keybind (customizable)E- Context interaction at modification zones
Players receive detailed feedback:
- โ "Access granted at Mission Row Police Department"
- โ "Access denied. Requires Police Officer (Grade 4+)"
โ ๏ธ "You must be at a designated modification garage"- ๐ง "Vehicle configuration saved successfully"
config.lua- Main configuration with auto-config systemCONFIG_GUIDE.md- Detailed configuration guideJOB_SYSTEM_GUIDE.md- Advanced job system documentationCLAUDE.md- Development guidance for Claude Code
- Menu not opening - Ensure you're in a modification zone with proper job/grade
- Job not detected - Enable debug mode:
Config.Debug = true - Custom liveries not working - Verify YFT files are properly streamed
- Framework not detected - Check resource start order (frameworks first)
Config.Debug = true -- Enable detailed console loggingProvides information on:
- Framework detection and initialization
- Job system queries and results
- Zone access checks and permissions
- Cache operations and performance metrics
- Startup Time: <2 seconds full initialization
- Job Validation: ~0.1ms (cached), ~50ms (database)
- Memory Usage: <2MB total resource footprint
- Database Impact: Minimal with intelligent caching
- ESX 1.x / Legacy
- QBCore / QBX
- QBox
- Standalone (no framework)
- Server build 4752+ recommended
- Lua 5.4 support
- โ Complete Auto-Configuration System - Zero manual setup required
- โ Advanced Job-Based Access Control - Grade-specific zone restrictions
- โ Multi-Framework Auto-Detection - Works with ESX, QBCore, QBox, Standalone
- โ Database Polling System - Real-time + fallback job validation
- โ Smart Caching - ox_lib integration with performance optimization
- โ 11+ Pre-configured Locations - All major emergency service stations
- โ Fixed Framework Scope Issues - Proper server/client variable handling
- โ Removed Duplicate Code - Cleaned up event handlers and functions
- โ Enhanced Error Handling - Graceful fallbacks and validation
- โ Performance Optimization - Async queries and intelligent caching
- โ Security Hardening - SQL injection protection and permission validation
- Config structure updated for auto-configuration
- Job permission system completely rewritten
- Database schema detection added
- Backup your current
config.lua - Install new version
- Add custom zones to
Config.ManualModificationZonesif needed - Test with debug mode enabled
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly across frameworks
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- ox_lib - Exceptional UI and utility library
- oxmysql - Reliable database connector
- FiveM Community - Continuous feedback and support
Original concept and code by @daemonalex ๐
