BC Designs FiveM Resource

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.

Before launch: Make sure your public package version is set to 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

Requirements

Required

Optional

Start order matters. Start ox_lib and oxmysql before ATG in your server.cfg.

Installation

  1. Download Advanced Turnout Gear from your purchase page.
  2. Place the resource folder into your server resources folder.
  3. Keep the folder name simple. Recommended: advanced_turnout_gear.
  4. Install the SQL file if gear wear is enabled. See SQL Setup.
  5. Configure config.lua and rank_config.lua.
  6. Add the resource to your server.cfg.
  7. 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;
Important: If you rename the wear table in 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

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 Data File

station_data/stations.json
Tip: Configure one station completely, test locker access, washer access, and duty behavior, then duplicate your setup pattern for additional stations.

Outfits

Turnout gear outfits are managed in-game using the Turnout Manager.

/turnoutmanager

Outfits Can Include

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

Recommended Public Defaults

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

Cleanliness Behavior

Debugging: Set 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

Gear wear is not saving

Station or turnout manager says you do not have permission

add_ace group.admin atg.stationmanager allow

Players cannot open lockers

Vehicle lockers do not work

Fire or smoke does not dirty gear

Outfit images do not show