- QBCore/QBX Framework, ESX, Standalone
- ox_lib
- OxMysql
- Easy-to-edit config to add additional jobs or custom job names
- Compatibility with QBX & ESX frameworks
- Change Vehicle Extras: Add and remove up to 20 vehicle extras
- Custom Skins: Change vehicle liveries
- Database Integration: Save and retrieve modifications for user vehicle preference persistence
- Job-based Access: Only allows first responders (police/ambulance) to modify emergency vehicles
- Standalone Compatibility: Custom setup for servers not using QBCore or ESX
Future Updates:
- Additional SQL logic to save preferences for each vehicle the player uses, with updates on each change
- Compatibility with other menus, TBD based on feedback
- Complete Mod menu for useable only at PD, EMS, or other locations specified in the config
/modveh
- Ensure your ox_lib and OxMysql dependencies are properly installed and configured in your server.
Clone or download this repository into your resources
folder and ensure it's loaded on your server.
Before starting your server, open the config.lua
file in the resource folder and set the Config.Framework
to one of the following:
'qb-core'
for QBCore/QBX'qbx_core'
for QBX'esx'
for ESX'standalone'
for a custom setup without a framework
-- Framework Selection Configuration
Config = {}
Config.Framework = 'standalone' -- Change this to 'qb-core', 'qbx_core', or 'esx' as needed
Open the fxmanifest.lua
file in the resource folder and uncomment the line for the framework you are using. Comment out the lines for the frameworks you are not using. Only one framework should be uncommented.
dependencies {
-- Uncomment the framework you are using. If Standalone leave it as is.
-- 'qb-core',
-- 'qbx_core',
-- 'es_extended',
'ox_lib'
}
Run the appropriate SQL script for your server's framework to create the emergency_vehicle_mods
table.
Run the SQL code in qbcore_sql.sql
:
CREATE TABLE IF NOT EXISTS `emergency_vehicle_mods` (
`id` INT NOT NULL AUTO_INCREMENT,
`vehicle_model` VARCHAR(255) NOT NULL,
`skin` VARCHAR(255) DEFAULT NULL,
`extras` TEXT DEFAULT NULL,
`player_id` VARCHAR(255) NOT NULL, -- Tracks player by identifier (optional)
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `vehicle_model_unique` (`vehicle_model`)
);
Run the SQL code in esx_sql.sql
:
CREATE TABLE IF NOT EXISTS `emergency_vehicle_mods` (
`id` INT NOT NULL AUTO_INCREMENT,
`vehicle_model` VARCHAR(255) NOT NULL,
`skin` VARCHAR(255) DEFAULT NULL,
`extras` TEXT DEFAULT NULL,
`player_id` VARCHAR(255) NOT NULL, -- Tracks player by identifier (optional)
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `vehicle_model_unique` (`vehicle_model`)
);
Run the SQL code in standalone_sql.sql
:
CREATE TABLE IF NOT EXISTS `emergency_vehicle_mods` (
`id` INT NOT NULL AUTO_INCREMENT,
`vehicle_model` VARCHAR(255) NOT NULL,
`skin` VARCHAR(255) DEFAULT NULL,
`extras` TEXT DEFAULT NULL,
`player_id` VARCHAR(255) NOT NULL, -- Tracks player by identifier (optional)
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `vehicle_model_unique` (`vehicle_model`)
);
After you've updated the configuration and set up your database, you can start your server. The Emergency Vehicle Modification System will now be fully integrated and functional!