Configuration ​
The core settings are in shared/config.lua. The data tables have their own files in shared/config/, loaded right
after it:
| File | Keys | Page |
|---|---|---|
shared/config/items.lua |
Config.Items (everything except weapons) |
Items |
shared/config/weapons.lua |
Config.Items (weapons, ammo, attachments) |
Items → Weapons |
shared/config/shops.lua |
Config.Shops |
Shops (switched off while np_shops runs, Config.NpShops) |
shared/config/crafting.lua |
Config.Crafting |
Crafting |
shared/config/stashes.lua |
Config.Stashes |
Inventories → Stashes |
shared/config/vehicles.lua |
Config.Vehicles |
Inventories → Trunks |
shared/config/searchables.lua |
Config.Searchables |
Inventories → Searchables |
All of them are shared (client and server), so keep secrets out of them. The webhook goes in server.cfg
(Installation). Units: weights in grams, times in ms unless a key says seconds, money as
integers.
General ​
| Option | Default | Description |
|---|---|---|
Config.Framework |
'auto' |
'qbx', 'qb', 'esx', 'standalone', or auto-detect (qbx_core → qb-core → es_extended → standalone). Set 'qbx' with provide 'ox_inventory', see Installation |
Config.Locale |
'en' |
Server language ('en', 'de') for server messages, item labels and the default UI language. Players can switch the UI language |
Config.Debug |
false |
Debug output: bridge selection, imports, unknown items, purges |
Config.AutoCreateTables |
true |
Run the statements of sql/np_inventory.sql at start |
Config.SaveInterval |
60000 |
Write-behind flush interval in ms (minimum 5000). Dirty inventories are also saved on logout, drop, resource stop and txAdmin's shutdown event |
Config.UseNpHud |
'auto' |
'auto' (np_hud when it runs), true or false: progress, prompts and toasts through np_hud |
Config.NpShops |
'auto' |
Step aside for np_shops: 'auto' (or true) switches the built-in Config.Shops shops off while np_shops is started or starting (no prompts, blips or purchases), live when np_shops starts or stops. Runtime shops (RegisterShop, qb CreateShop) stay active. false keeps both. See Shops → np_shops detection |
Config.Payments |
'auto' |
Shop cash / card totals through the np_payments checkout: 'auto' while np_payments runs, true required (purchases fail without it), false never. See Shops → np_payments |
Config.Material |
nil |
nil follows the server theme from np_admin. 'frosted' or 'liquid' (Liquid Glass) wins over it. Players can switch it, stored in client KVP |
Config.Brand |
nil |
nil follows the server theme. A brand set here wins, e.g. { color = '#3d74ff', strength = 'accent' } |
Config.Scale |
nil |
UI scale. nil = automatic (innerHeight / 1080, at least 0.75) |
Config.ImagePath |
'nui://np_inventory/web/images/' |
Base URL for item images (see Items → Images) |
Config.ImportLegacy |
true |
Import the framework's old inventory column on a character's first load (Migrating) |
Keys, hotbar and player limits ​
Config.Keys = { inventory = 'TAB', hotbar = { '1', '2', '3', '4', '5' }, handsUp = 'X' }
Config.HotbarSlots = 5
Config.Player = { slots = 25, maxWeight = 85000 }
Config.Overload = { noSprint = 1.0, noPickup = 1.2 }
| Option | Description |
|---|---|
Keys.inventory / Keys.hotbar / Keys.handsUp |
Default keys of the key mappings. Players rebind them under Settings → Key Bindings → FiveM; a changed default only applies to players who never bound the key. See Events → Keys |
HotbarSlots |
Size of the hotbar: player slots 1 … HotbarSlots are the hotbar |
Player.slots / Player.maxWeight |
Pocket slots and carry weight in grams before equipment bonuses |
Overload.noSprint / noPickup |
Fractions of the max weight: above noSprint the player can't sprint, above noPickup nothing can be picked up. The overload chip shows both levels |
Cash and money ​
Config.Cash = { mode = 'item', item = 'money', black = 'black_money' }
| Option | Description |
|---|---|
mode = 'item' |
Cash is the item (robbable, droppable, tradeable), synced both ways with the framework cash. Changes made by other resources through the framework (e.g. a paycheck in cash) show up as items |
mode = 'account' |
Cash stays in the framework only. The UI shows it as a chip in the header |
item / black |
Item names for cash and black money |
Black money is the black item on qb, qbx and standalone (no framework account is touched). On ESX it is a real
account: in item mode the item is synced with it like cash, in account mode the account is used. Shops and trades read
the right source automatically.
Give, trade, drops, use, decay ​
Config.Give = { distance = 3.0, showNames = false, anim = true, blockInVehicle = true }
Config.Trade = { distance = 4.0, countdown = 3000, offerSlots = 8, requestTimeout = 20000, blockInVehicle = true }
Config.Drops = {
despawn = 900, mergeRadius = 1.5, openDistance = 3.0,
model = 'prop_paper_bag_small', bagModel = 'prop_cs_heist_bag_02',
maxPerArea = 30, slots = 50, maxWeight = 1000000,
}
Config.Use = { minElapsed = 0.8, tokenTtl = 120, blockInVehicle = false }
Config.Decay = { enabled = true, eatSpoiled = false, spoiledStress = 10, stackWindow = 60 }
| Option | Description |
|---|---|
Give.distance |
Players within this many metres show up in the give picker |
Give.showNames |
true shows real names; otherwise "Person #id" unless the bridge says they know each other |
Give.anim / blockInVehicle |
Hand-over animation / no giving from a vehicle |
Trade.distance |
Max distance for a request and for the swap |
Trade.countdown |
ms between both confirmations and the swap |
Trade.offerSlots |
Item offers per side |
Trade.requestTimeout |
ms a trade request stays open |
Drops.despawn |
Seconds an untouched drop stays |
Drops.mergeRadius |
A new drop this close (m) to an existing one goes into it |
Drops.openDistance |
Max distance to open or pick up |
Drops.model / bagModel |
Prop for a drop, and for a drop that holds a bag |
Drops.maxPerArea |
Drops within 25 m before new items go into the nearest drop |
Drops.slots / maxWeight |
Size of one drop |
Use.minElapsed |
The client's "done" must arrive after duration × minElapsed, otherwise the use is rejected (anti-skip) |
Use.tokenTtl |
Seconds a use token stays valid |
Use.blockInVehicle |
Block every use in a vehicle (per item: use.disable.car) |
Decay.enabled |
Food decay on / off |
Decay.eatSpoiled / spoiledStress |
Allow eating spoiled food, adding this much stress |
Decay.stackWindow |
Food made within this many seconds shares a timestamp, so it stacks |
Weapons, police, robbing ​
Config.Weapons = { durability = true, jamBelow = 15, serialPrefix = 'NP', disableWheel = true, maxShotsPerSync = 120 }
Config.Police = {
groups = { police = 0, sheriff = 0 },
friskCategories = { 'weapon', 'ammo', 'illegal' },
friskDistance = 2.0,
friskRequiresSurrender = true,
fullSearchTime = 5000,
evidence = {
label = 'MRPD Evidence',
coords = vec3(474.27, -991.12, 26.27),
radius = 3.0,
groups = { police = 2, sheriff = 2 },
slots = 100, maxWeight = 500000,
},
confiscate = { slots = 60, maxWeight = 1000000 },
}
Config.Rob = { enabled = true, requireHandsUp = true, allowDowned = true, allowCuffed = true, distance = 2.0, notifyVictim = true }
| Option | Description |
|---|---|
Weapons.durability |
Weapons wear per shot (weapon.wear of the item) |
Weapons.jamBelow |
Below this durability each shot can jam (linear: 0 % at the threshold, 15 % at 0). R clears the jam |
Weapons.serialPrefix |
Serial format <prefix><6 digits><2 letters>, e.g. NP048213KX |
Weapons.disableWheel |
Turn off the GTA weapon wheel (weapons come from the hotbar) |
Weapons.maxShotsPerSync |
Sanity cap for the shots a client reports in one sync |
Police.groups |
Jobs (or gangs) that frisk instead of rob, { job = minGrade }. Officers must be on duty when the framework reports duty; off duty they fall back to the rob rules |
Police.friskCategories |
Categories visible in a pat-down. Every other slot is a hidden placeholder until the full search |
Police.friskDistance |
Max distance for a frisk |
Police.friskRequiresSurrender |
true: police can only frisk a target with hands up, cuffed or downed. false: anyone in reach |
Police.fullSearchTime |
ms of the full search progress (the server requires 80 % of it) |
Police.evidence |
The evidence locker: label, position, radius, allowed groups and the size of each case |
Police.confiscate |
Size of the per-character holding stash used by ConfiscateInventory |
Rob.enabled |
Robbing on / off |
Rob.requireHandsUp |
false allows robbing anyone in reach |
Rob.allowDowned / allowCuffed |
Downed / cuffed players can be robbed without hands up |
Rob.distance |
Max distance |
Rob.notifyVictim |
The victim gets a toast and the np_inventory:robbed event |
See Inventories → Rob & frisk.
Built-in items ​
Config.BuiltinItems = {
repairkit = { enabled = true, engine = 60, distance = 3.0, hoodDistance = 1.8 },
spare_tire = { enabled = true, distance = 3.0 },
jerrycan = { enabled = true, capacity = 20, distance = 3.0,
resources = { 'np_fuel', 'ox_fuel', 'LegacyFuel', 'cdn-fuel', 'ps-fuel' },
owner = 'np_fuel' },
lockpick = { enabled = true, chance = 35, distance = 3.0 },
adrenaline = { enabled = true, distance = 2.0, heal = 50 }, -- revive = function(src, target) … end
radio = { enabled = true, channelPrompt = true, event = 'np_inventory:radio',
resources = { { name = 'qb-radio', event = 'qb-radio:use' } } },
phone = { enabled = true, resource = 'np_phone', event = 'np_inventory:phone' },
}
| Option | Description |
|---|---|
enabled |
false switches the behaviour off; the item then goes to the framework's usable callback when there is one |
distance |
Reach to the target vehicle or player (m) |
repairkit.engine / hoodDistance |
Engine health % after a repair (only engines below it qualify) / how close to the hood the player must stand |
jerrycan.capacity / resources |
Litres in a new can / fuel resources, the first started one gets the fuel (else the native fuel level) |
<item>.owner |
A resource that owns the item's use while it is started; the built-in steps aside (jerry can: 'np_fuel', false = always built-in). See Items → Owner resource |
lockpick.chance |
Success chance per attempt in %, rolled on the server |
adrenaline.heal / revive |
Health after a standalone revive / your own revive function, used instead of the framework's |
radio.resources / channelPrompt / event |
Radio resources with the event to fire; else a pma-voice channel prompt; else this local event |
phone.resource / event |
Resource whose toggle export opens the phone; else this local event |
Config.Minigames replaces the lockpick's progress bar and chance roll (and, opt-in, the repair kit's and spare tire's
bars) with np_minigames games while it runs: enabled, wait, and per built-in enabled, game,
difficulty, opts; for the lockpick also classes, models and breakOn. See
Items → Minigames.
Shops, crafting, searchables ​
| Option | Default | Description |
|---|---|---|
Config.ShopDistance |
3.0 |
Default max distance to a shop location (per shop: distance) |
Config.CraftingQueueMax |
10 |
Queued crafts per player and bench |
Config.CraftingDistance |
2.5 |
Default bench radius (per bench: radius) |
Config.Skills |
{ enabled = 'auto', get = nil } |
Recipe skill requirements and the bench skill header. 'auto': on when get is set or the framework has skills (qb / qbx metadata.skills), off on ESX and standalone, where skill requirements are skipped. get = function(src, name) return level end plugs in any skill resource |
Config.SearchDistance |
2.5 |
Reach for searchable props (capped at 2.5 m on the client) |
Config.SearchSpacing |
1.5 |
Searched spots of one entry closer than this (m, horizontal) share the cooldown |
Items and metadata ​
| Option | Default | Description |
|---|---|---|
Config.StackIgnoreMetadata |
{} |
Metadata keys ignored when deciding if two stacks merge |
Config.ShowMetadataKeys |
{} |
Extra metadata keys the UI shows in tooltips: { 'key' } or { key = 'Label' } (see Items → Metadata) |
Config.Rename |
{ enabled = true, maxLength = 32, blocklist = { … } } |
Players can rename unique items. Labels are trimmed, length-limited, stripped of `<>{}`` and checked against the blocklist (substring, case-insensitive) |
Config.Containers |
{ purgeDays = 7 } |
Rows of bags that no longer exist anywhere are deleted after this many days. 0 keeps them |
Config.Categories |
15 categories | [id] = { label, icon, tint }, see Items → Categories |
Logs, admin, rate limits ​
Config.Logs = {
webhook = '',
actions = { give = true, trade = true, drop = true, pickup = true, buy = true, craft = true, admin = true, rob = true, confiscate = true },
}
Config.Admin = {
commands = { give = 'giveitem', clear = 'clearinv', open = 'openinv', items = 'itemlist' },
}
Config.RateLimit = { perSecond = 20, burst = 40, maxPayload = 16384 }
| Option | Description |
|---|---|
Logs.webhook |
Discord webhook. The np_inventory_webhook convar wins |
Logs.actions |
Actions posted to the webhook (np_admin's audit log, category np_inventory, gets every action while it runs). The database log always gets every action (also frisk and moves into foreign inventories) |
Admin.commands |
Command names. Remove a key to drop that command. Who may use them is the permission node np_inventory.admin (Permissions); the old Admin.ace key is gone |
RateLimit.perSecond / burst |
Token bucket per player for all RPCs (each RPC has its own limit on top) |
RateLimit.maxPayload |
Max size of one RPC payload in bytes |
Framework details ​
Config.Status = { hunger = 'hunger', thirst = 'thirst', stress = 'stress' }
Config.JobStyles = {
police = { icon = 'shield-halved', tint = 'blue' }, sheriff = { icon = 'star', tint = 'blue' },
ambulance = { icon = 'kit-medical', tint = 'red' }, mechanic = { icon = 'wrench', tint = 'orange' },
taxi = { icon = 'taxi', tint = 'orange' }, realestate = { icon = 'house', tint = 'green' },
}
| Option | Description |
|---|---|
Status |
Names of the hunger / thirst / stress values: qb / qbx metadata keys (0–100), esx_status names on ESX |
JobStyles |
Icon and tint of the job chip in the inventory header, per job name |
Config.Esx = { overrideInventory = false }
overrideInventory = true redirects ESX's xPlayer inventory functions to np_inventory (ESX Legacy 1.9+). See
Compatibility → ESX.
Editable in np_admin ​
While np_admin runs, staff can change part of the config live under Resource settings →
Inventory (shared/np_admin_settings.lua). shared/config.lua stays the default and np_admin stores only the
overrides. Without np_admin the config file is all there is.
| Category | Fields |
|---|---|
| General | Default language, default material, debug, save interval, import framework inventories |
| Player | Pocket slots, max carry weight, no-sprint / no-pickup thresholds (Overload) |
| Give & trade | Give distance, names in the give picker, hand-over animation, trade distance, trade countdown, trading in vehicles |
| Drops | Despawn time, merge radius, open distance |
| Use | Item use in vehicles, eating spoiled food, stress from spoiled food |
| Minigames | np_minigames on / off; lockpick game on / off, game, default difficulty and the failure reasons that break it; repair kit and spare tire game on / off, game and difficulty |
| Weapons | Weapon wear, jam threshold, weapon wheel |
| Police & robbery | Frisk needs surrender, frisk distance, full search time, robbing on / off, hands up, robbery distance, notify the victim |
| Items | Renaming, max label length, blocked words |
| Logs | Discord webhook (secret; the np_inventory_webhook convar still wins), webhook toggles for admin, give, trade and robbery |
Almost everything applies live. Default language and material reach a client on its next init (reconnect); pocket slots and max weight apply when a character loads.