Skip to content

np_inventory v0.1.0 ​

A FiveM inventory based on slots, weight and per-item metadata, built on the Nimbus UI design system, the same look as np_hud, np_phone and np_character: glossy squircle icon tiles, frosted grey glass lit from above, Quicksand type, and colour only where it means something (red = medical, aqua = drinks, rust = weapons, …).

It runs on qbx_core, qb-core and es_extended, or standalone without a framework. It answers the ox_inventory and qb-inventory exports, so existing scripts keep working (see Compatibility). It requires oxmysql and np_prophandler 1.1.0+ (drop props and held items). Every inventory lives in server memory, every change is atomic, and the client never decides what it owns.

Inventory with a trunk

Interactions Equipment and backpack
Interactions Equipment
Give Trade
Give Trade
Crafting bench Shop
Crafting Shop
Police pat-down In game: hotbar, feed, progress, prompt
Frisk HUD
Liquid Glass ID card shown to another player
Liquid Glass ID card

The screenshots come from the browser mock, most of them in German (see Development). The UI ships in English and German.

At a glance ​

  • Slots + weight + metadata: an item fits only when a slot is free (or it stacks) and the weight holds, and the UI says which limit it hit. Stacks merge only with equal metadata. Unique items carry their own data: serial, durability, freshness, quality, owner, ammo, attachments, a player-given name. See Items.
  • Inventory types: pockets with a 5-slot hotbar, equipment, ground drops, trunks and gloveboxes (size per vehicle class, per-model overrides, front trunk for mid-engine cars), stashes (job / gang, personal, fixed owner, PIN), bags, searchable props (dumpsters, bins), the police evidence locker and temporary stashes. See Inventories.
  • Equipment: head, mask, glasses, vest, bag, primary, secondary and hands. A backpack adds carry weight; a vest gives armour that wears down with the damage you take.
  • Item behaviour: use with progress bar, animation and prop (the server checks the elapsed time, so the progress can't be skipped), hunger / thirst / stress / health / armour, durability per use, food that spoils (coolers slow it down), documents with the holder's data, and custom context actions. Repair kit, spare tire, jerry can, lockpick, adrenaline shot, radio and phone work out of the box. Item callbacks follow ox_inventory.
  • Weapons as items: serial number and registered owner, ammo in the magazine, reload from ammo items, unload, attachments (including extended magazines), wear per shot and jams at low durability. The weapon wheel is off; weapons come from the hotbar.
  • Cash as an item or an account: in item mode the money item is synced both ways with the framework cash, so it can be dropped, robbed and traded. On ESX black_money is synced with the black money account the same way.
  • Interactions: drag & drop with live checks, Shift quick move, Ctrl half stack, Alt split dialog, mouse wheel amounts, keys 1–5 to the hotbar, context menu, search, category filters, sort, stack, take all, NEW badges, tooltips with metadata and full keyboard navigation.
  • Social: a give picker with nearby players (anonymous until they know each other), a trade window where both sides lock and confirm and every change resets both locks, a countdown and an atomic swap.
  • Robbing and police: robbing only works when the target has hands up (X), is cuffed or downed. On-duty police (same rules, checked on the server) first get a pat-down that shows only weapons, ammo and illegal items, then a full search. Confiscate / return exports and an evidence locker with case numbers.
  • Shops and crafting: stock with timed restock, job discounts, licence and job locks, cash / card / black money; a crafting queue that keeps running while you are away, tools that aren't consumed, skill locks, chance-based quality and exact refunds on cancel. See Shops & crafting.
  • HUD: hotbar, item feed (+2 Water, −1 Bandage), progress bars, prompts, toasts and an overload chip (no sprinting above 100 %, no picking up above 120 %). With np_hud running, progress, prompts and toasts go through np_hud.
  • Server-authoritative: each action is an RPC with a schema, a rate limit and a session check; distance, access and the vehicle lock are re-checked on every move, and a stale client gets fresh views instead of duplicating items. Write-behind persistence (flush every 60 s, on logout, on stop).
  • Logs and hooks: gives, trades, drops, pick-ups, purchases, crafting, robberies and admin actions go to the database, optionally a Discord webhook and, while np_admin runs, its audit log. Other resources can veto moves, uses, gives, purchases, crafts and opens with hooks.
  • Staff tools (optional np_admin): permission nodes instead of ACE, live-editable settings and staff actions (give item, clear / open inventory, open a stash). See Installation → Permissions.
  • Player settings: frosted or Liquid Glass material and language (en / de), plus a server brand colour.

Quick example ​

lua
-- server: give two waters, but only if they fit
if exports.np_inventory:CanCarryItem(source, 'water', 2) then
  exports.np_inventory:AddItem(source, 'water', 2)
end

-- server: a job locker, one per character
exports.np_inventory:RegisterStash('lsmd_locker', 'LSMD Locker', 50, 200000, true, { ambulance = 0 })

-- server: no weed in drops
exports.np_inventory:registerHook('beforeMove', function(payload)
  if payload.toType == 'drop' then return false, 'Not here.' end
end, { itemFilter = { weed = true } })

-- client: react to items arriving or leaving
AddEventHandler('np_inventory:itemCount', function(name, count)
  if name == 'radio' and count == 0 then print('radio gone') end
end)

Next steps ​