SMX logo

SMX Documentation

Production-grade Script Knowledge Base

Build 2026.04 Live Docs



Inventory

Scripts · FiveM Ready

Installation Blueprint

Step 1: Place Resource

Extract the script to resources/[smx]/smx-inventory and keep the folder name unchanged.

Step 2: Start Dependencies

Make sure oxmysql and your framework resource are started before this inventory.

Step 3: Configure Base Settings

Set framework mode, keybinds, limits and optional systems in config.lua.

Step 4: Database + First Boot

Start the server once to auto-create inventory tables. Optionally import sql/install.sql for item seeds.

Step 5: Validation

Test open inventory, trunk, moving between containers, weapon usage, and one configured storage point.

Recommended server.cfg Order

ensure oxmysql
ensure es_extended   # or qb-core
ensure smx-inventory

smx-inventory declares @oxmysql/lib/MySQL.lua and dependencies { 'oxmysql' }, so DB startup order must be correct.

Important: Do not rename the resource. The NUI image path uses nui://smx-inventory/html/assets/items/.

SQL and Item Seeds

The server automatically creates these storage/runtime tables: smx_inventory_trunks, smx_inventory_gloveboxes, smx_inventory_stashes, smx_inventory_ground, smx_inventory_backpacks, smx_inventory_backpack_owners, smx_inventory_weapon_durability, smx_inventory_weapon_attachments, smx_inventory_player_loadouts.

sql/install.sql additionally includes ESX item inserts for weapon boxes, ammo, repair kit and attachment items.