Skip to the content
Docs

Installation

Follow these steps in order.

1. Place the resource

Drop the 5code-loadouts folder into your server's resources directory.

2. Edit config.lua

Open config.lua and set the basics for your server.

lua
Config.Framework       = 'auto'          -- 'auto' | 'qb-core' | 'qbx_core' | 'esx'
Config.InventorySystem = 'ox_inventory'  -- 'qb-inventory' | 'ox_inventory' | 'codem-inventory'
Config.InteractionMode = 'qb-target'     -- 'qb-target' | 'ox_target' | 'interact'
Config.NotifySystem    = 'ox_lib'        -- 'qb' | 'ox_lib' | 'codem-notification' | 'esx'

Config.Job = 'police'
Config.NPCs = {
    {
        model    = 's_m_y_cop_01',
        coords   = vector4(-450.3, 7102.0, 22.38, 25.41),
        scenario = 'WORLD_HUMAN_CLIPBOARD',
        label    = 'Police Armory',
        blip     = { sprite = 110, color = 29, scale = 0.8, name = 'Police Armory' },
    },
    -- one entry per station; every NPC opens the same armory
}

Config.BossGrades = { 3, 4 }

3. Grant admin access via ACE

Add the admin ACE line for each admin's license identifier in server.cfg.

cfg
add_ace identifier.license:YOUR_LICENSE_HERE loadouts.admin allow

4. Add to server.cfg

Make sure 5CODE Loadouts starts after its dependencies.

cfg
ensure oxmysql
ensure qb-core            # or qbx_core / es_extended
ensure ox_inventory       # or your chosen inventory
ensure 5code-loadouts

5. Start the server

On first start, the script auto-creates its database tables. Watch the console for any errors.

6. Test in-game

Go to the armory NPC coordinates, interact, and confirm you can open the armory UI. If you are in a boss grade or have loadouts.admin, you will also see the management UI.