Advanced Turnout Gear Documentation
Station-based turnout gear, EUP outfit management, duty/rank access, vehicle gear lockers, cleanliness, and gear wear tracking for FiveM fire roleplay servers.
1.0.0, remove any test data from rank_data/ranks.json, and replace placeholder images with your department/server branding.
Overview
Advanced Turnout Gear is a FiveM resource designed for fire and EMS roleplay communities that need a clean, configurable turnout gear system.
ATG allows server owners to create station-based lockers, assign turnout sets to stations, restrict access by duty status and rank, save player-specific gear variations, and optionally track gear cleanliness and wear over time.
Core Features
- Station-based turnout lockers
- In-game station manager
- In-game turnout manager
- Rank-based turnout access
- Framework support for QBCore, QBox, ESX, custom, or standalone servers
- Optional duty requirement before accessing gear
- Vehicle gear locker access from configured apparatus
- Player gear variations saved per player
- Optional cleanliness tracking through SmartFires or z_fire
- Optional SQL-backed gear wear and wash/service system
Requirements
Required
ox_liboxmysql- MariaDB or MySQL database
Optional
- QBCore, QBox, ESX, custom framework, or standalone mode
- SmartFires or z_fire for fire/smoke detection
ox_lib and oxmysql before ATG in your server.cfg.
Installation
- Download Advanced Turnout Gear from your purchase page.
- Place the resource folder into your server resources folder.
- Keep the folder name simple. Recommended:
advanced_turnout_gear. - Install the SQL file if gear wear is enabled. See SQL Setup.
- Configure
config.luaandrank_config.lua. - Add the resource to your
server.cfg. - Restart the server.
# Dependencies
ensure ox_lib
ensure oxmysql
# Advanced Turnout Gear
ensure advanced_turnout_gear
Admin Permission
ATG uses an ACE permission for station, turnout, and rank management.
add_ace group.admin atg.stationmanager allow
If your admin group is named differently, update the group name to match your server.
SQL Setup
ATG includes a SQL file for gear wear persistence:
sql/atg_gear_wear.sql
Import this file into your server database before starting ATG if Config.WearAndTear.useSql is enabled.
Default Table
CREATE TABLE IF NOT EXISTS `atg_gear_wear` (
`owner_identifier` VARCHAR(120) NOT NULL,
`outfit_id` VARCHAR(80) NOT NULL,
`durability` INT NOT NULL DEFAULT 100,
`uses` INT NOT NULL DEFAULT 0,
`minutes_worn` INT NOT NULL DEFAULT 0,
`used_seconds` BIGINT NOT NULL DEFAULT 0,
`seconds_since_wash` BIGINT NOT NULL DEFAULT 0,
`wash_required` TINYINT(1) NOT NULL DEFAULT 0,
`state_version` TINYINT NOT NULL DEFAULT 1,
`last_used` BIGINT NULL,
`updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`owner_identifier`, `outfit_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
config.lua, make sure the SQL table name matches.
Configuration
The main configuration file is:
config.lua
General Settings
Config.InteractKey = 38 -- E
Config.DrawDistance = 25.0
Config.InteractDistance = 2.0
Config.UseBlips = false
Config.UseMarkers = true
UI Footer Label
Config.UI = {
footerLabel = "CHANGE ME"
}
Update this label before release to match your server or department branding.
Data Files
Config.StationDataFile = "station_data/stations.json"
Config.OutfitDataFile = "outfit_data/outfits.json"
Stations and outfits are managed in-game and saved to JSON files.
Vehicle Gear Access
Configured vehicles can act as mobile turnout gear lockers.
Config.VehicleGearAccess = {
enabled = true,
requireStopped = true,
blockDriverSeat = true,
vehicles = {
["engine113"] = {
station = "Station 113",
label = "Engine 113",
seatAccess = true,
trunkAccess = true,
customOffset = false,
rearOffset = vector3(0.0, -4.6, 0.35)
}
}
}
The station value should match either the station ID or the station name configured in ATG.
Framework Setup
ATG can run in standalone mode or integrate with a framework.
Config.Framework = {
type = "standalone", -- standalone, auto, qbcore, qbx, esx, custom
restrictAccess = false,
allowedJobs = {
"fire",
"ambulance"
},
gradeOffset = 1,
rankSource = "hybrid",
characterIdentifierSource = "character"
}
Framework Type
standalone— uses ATG duty/rank systems only.auto— attempts to detect QBox, QBCore, or ESX.qbcore,qbx,esx— forces a specific framework.custom— allows custom hooks inconfig.lua.
Job Restrictions
To only allow specific framework jobs to use gear lockers:
Config.Framework.restrictAccess = true
Config.Framework.allowedJobs = {
"fire",
"ambulance"
}
Duty Requirement
Config.Duty = {
enabled = true,
source = "standalone", -- standalone, framework, hybrid
requireOnDutyForGearAccess = true
}
If enabled, players must be on duty before opening station or vehicle gear lockers.
Ranks
Ranks are configured in:
rank_config.lua
Config.Ranks = {
[1] = "Probationary",
[2] = "Firefighter",
[3] = "Lieutenant",
[4] = "Captain",
[5] = "Battalion Chief",
[6] = "Chief"
}
Stations
Stations are created and managed in-game using the Station Manager.
/stationmanager
Stations Can Include
- Station name
- Suit-up / locker location
- Decontamination or washer location
- Clock-in / clock-out location when duty is enabled
- Marker settings
Station Data File
station_data/stations.json
Outfits
Turnout gear outfits are managed in-game using the Turnout Manager.
/turnoutmanager
Outfits Can Include
- Outfit ID
- Display name
- Station assignment
- Image
- Allowed ranks
- Male and female EUP component/prop values
- Vehicle locker access toggle
- Cleanliness/contamination behavior
Image Files
Outfit images should be placed in:
html/images/
Supported formats include PNG, JPG, and WEBP.
Player Gear Variations
ATG can allow players to save personal versions of standard issue gear without changing the base outfit for everyone.
Config.PlayerVariations = {
enabled = true,
allowPlayerCustomization = true,
requireBaseOutfitAccess = true
}
Player variations are stored in:
outfit_data/player_outfits.json
Gear Wear
The gear wear system tracks the condition and service status of turnout gear over time.
Config.WearAndTear = {
enabled = true,
useSql = true,
tableName = "atg_gear_wear",
lifespanHours = 48,
tickSeconds = 60,
washAfterHours = 8,
requireWashBeforeUse = true,
requireServiceBeforeUse = true,
warningAt = 45,
serviceAt = 0,
replaceExpiredAtWasher = true
}
How Wear Works
- Only time spent wearing a turnout set counts toward its lifespan.
- Gear can require washing after a configured number of hours.
- Contamination can add permanent wear.
- Washing removes dirt and resets the wash timer, but does not undo permanent wear.
- Expired gear can be exchanged for a fresh set at a washer if enabled.
Recommended Public Defaults
- Enable SQL persistence for public servers.
- Use clear washer/decon locations at each station.
- Test wash/service behavior before opening the server to players.
SmartFires / z_fire
ATG can optionally detect nearby fire and smoke using SmartFires or z_fire.
Config.Cleanliness = {
enabled = true,
smartfires = true,
z_fire = false,
smartFiresResource = "SmartFires",
zFireResource = "z_fire",
fireLoss = 5,
smokeLoss = 2,
requireCleaningBeforeUse = true,
debug = false
}
Setup Notes
- Only enable the fire system your server actually uses.
- Make sure the resource name matches your server.
- If your SmartFires resource is renamed, update
smartFiresResource. - If your z_fire resource is renamed, update
zFireResource.
Cleanliness Behavior
- Fire exposure reduces cleanliness by
fireLoss. - Smoke exposure reduces cleanliness by
smokeLoss. - If
requireCleaningBeforeUseis enabled, heavily contaminated gear must be cleaned before reuse.
Config.Cleanliness.debug = true only while testing. Turn it off on live servers to avoid unnecessary console spam.
Commands
| Command | Description | Permission |
|---|---|---|
/stationmanager |
Opens the Station Manager UI. | atg.stationmanager |
/turnoutmanager |
Opens the Turnout Manager UI. | atg.stationmanager |
/outfitconfigurator |
Opens the outfit configurator. | Server dependent |
/exportoutfit |
Exports the player’s current outfit data for configuration use. | Server dependent |
/setrank [id] [rank] |
Sets a player’s standalone ATG rank. | atg.stationmanager |
/atgrank |
Checks your current ATG rank. | None |
/atgreloadstations |
Reloads station data from JSON. | atg.stationmanager |
/atgreloadoutfits |
Reloads outfit data from JSON. | atg.stationmanager |
Troubleshooting
ATG does not start
- Make sure
ox_libstarts before ATG. - Make sure
oxmysqlstarts before ATG. - Check your server console for missing dependency errors.
Gear wear is not saving
- Confirm your database connection is working.
- Import
sql/atg_gear_wear.sql. - Confirm
Config.WearAndTear.useSql = true. - Confirm the configured table name exists in your database.
Station or turnout manager says you do not have permission
- Add the ACE permission to your
server.cfg. - Make sure your player is actually in the admin group receiving that permission.
add_ace group.admin atg.stationmanager allow
Players cannot open lockers
- Check duty requirements.
- Check framework job restrictions.
- Check rank restrictions on the outfit.
- Make sure the player is close enough to the locker marker.
Vehicle lockers do not work
- Make sure
Config.VehicleGearAccess.enabled = true. - Confirm the vehicle spawn name exactly matches the config entry.
- Make sure the vehicle is stopped if
requireStoppedis enabled. - Make sure the player is not in the driver seat.
- Confirm the outfit is assigned to the vehicle’s station and allowed for vehicle access.
Fire or smoke does not dirty gear
- Make sure SmartFires or z_fire is running.
- Enable only the fire system your server uses.
- Confirm the configured resource name matches the actual resource folder name.
- Temporarily enable
Config.Cleanliness.debug = truewhile testing.
Outfit images do not show
- Place images in
html/images/. - Use PNG, JPG, or WEBP files.
- Check spelling and capitalization.
- Make sure the image path in the turnout manager matches the actual file name.