← Guides
Configuration

Configure the Loadout script

The Loadout script gives players a defined weapon/armour kit from an armoury point, gated by job or permission. Everything is in config.lua. This walks the file top to bottom.

Framework

Auto-detect works for ESX Legacy and QBCore/QBX. Force it if you run a fork or a custom export:

Config.Framework = 'auto'   -- 'auto' | 'esx' | 'qbcore' | 'standalone'
Config.Locale    = 'en'     -- files in locales/

On standalone the script skips job checks entirely and only uses ace-permission gates (below).

The armoury point

Config.Armouries = {
    ['mission_row'] = {
        coords = vec3(482.6, -14.5, 100.7),
        heading = 87.0,
        blip = { sprite = 110, colour = 3, scale = 0.8 },
        marker = true,          -- false if you place a ped/target instead
        ['jobs'] = { 'police', 'sheriff' },
    },
}

Add as many armoury entries as you need — each can serve different jobs and different kits. If Config.UseOxTarget = true and ox_target is running, the marker is replaced with an interaction zone automatically.

Defining kits

A kit is a named list of weapons, components, ammo and armour. Reference kits by name from armoury entries or the GiveLoadout export.

Config.Kits = {
    ['patrol'] = {
        label = 'Patrol',
        armour = 100,
        weapons = {
            { name = 'WEAPON_COMBATPISTOL', ammo = 60,
              components = { 'COMPONENT_AT_PI_FLSH', 'COMPONENT_COMBATPISTOL_CLIP_02' } },
            { name = 'WEAPON_STUNGUN', ammo = 1 },
            { name = 'WEAPON_FLASHLIGHT' },
        },
    },
    ['supervisor'] = {
        label = 'Supervisor',
        inherits = 'patrol',                 -- start from patrol, then add
        weapons = {
            { name = 'WEAPON_CARBINERIFLE', ammo = 120,
              components = { 'COMPONENT_AT_AR_FLSH', 'COMPONENT_AT_SCOPE_MACRO' } },
        },
    },
}

inherits merges the parent kit first, so supervisor gets everything in patrol plus the carbine.

Who can take what

Two gate types, and you can use both:

Config.PermissionMode = 'job'   -- 'job' | 'ace' | 'both'

-- job/grade gate, per kit
Config.KitAccess = {
    ['patrol']     = { police = 0, sheriff = 0 },   -- grade 0 and up
    ['supervisor'] = { police = 3, sheriff = 3 },
}

-- ace gate (works on standalone too)
-- add_ace group.pd_supervisor loadout.supervisor allow
Config.KitAce = {
    ['supervisor'] = 'loadout.supervisor',
}

Persistence (v2.1+)

Config.Persistence = true    -- restore a player's last kit on join
Config.PersistenceTable = 'sl_loadout_state'   -- auto-created

With this on, taking a kit is “sticky” — handy for servers where players expect to keep their gear through a restart. Turn it off for hardcore/wipe-on-death setups.

Granting kits from other resources

-- server-side, from a job script or admin menu
exports['sl_loadout']:GiveLoadout(source, 'supervisor')

-- strip everything the script gave them
exports['sl_loadout']:ClearLoadout(source)
Component and weapon hashes must exist before the script runs. If you're using a Story Loadout ranged pack for kit weapons, ensure it above sl_loadout in server.cfg.

Questions, or something not working? The Discord is the fastest way to get an answer — and where every new drop lands first.

Join the Discord