SMX logo

SMX Documentation

Production-grade Script Knowledge Base

Build 2026.04 Live Docs



Inventory

Scripts · FiveM Ready

Operational Playbook

1. Open

Use /inventory or keybind (default F2) to open your main inventory.

2. Move

Move items between player inventory and secondary containers (ground, trunk, glovebox, stash).

3. Interact

Use, drop or give items. Give mode supports direct target id or crosshair selection.

4. Weapon Maintenance

Manage durability, apply attachments and load ammo items depending on weapon category.

5. Admin Controls

Use admin commands for moderation, testing or restoring broken player states.

Integration Snippets

-- Server: open custom stash/storage
exports['smx-inventory']:OpenStash(playerId, 'evidence_room', 'EVIDENCE ROOM', 4000, 60)
exports['smx-inventory']:OpenConfiguredStorage(playerId, 'police_armory_storage')

-- Client: open custom stash directly
exports['smx-inventory']:OpenStorage('temporary_stash', 'TEMP STASH', 1200, 30)
Tip: For job-restricted storages, keep ids and job names in Config.Storages aligned with your framework job names.

Admin Command Examples

/admingiveitem 17 bread 5
/adminremoveitem 17 bread 2
/admingiveweapon 17 weapon_pistol 60
/adminremoveweapon 17 weapon_pistol
/clearinv 17

These commands are gated by Config.AdminGroups and QBCore permission checks (when using QB mode).