X3D Inventory
Free ESX inventory with big readable text, hotkeys 1–9 saved per character, coupon-based capacity and a storage panel for any vault or trunk script.
Buy / Get freeConfig builderInstallation
Requires es_extended (ESX Legacy) and oxmysql · optional: esx_notify
- Unzip and put the
x3d_inventoryfolder inresources/(keep the folder name — item pictures and exports use it) - Run
install.sqlon your ESX database — it creates the hotkey table and adds example items (existing items are never overwritten) - Add to
server.cfgafteres_extended:
ensure x3d_inventory
- Stop your old inventory script so only one runs
Keys and commands
| Key / command | Does |
|---|---|
T |
Open/close the bag (Config.OpenKey) — players can rebind it in FiveM's key bindings |
1–9 |
Use the item in that hotkey |
| Double-click / right-click | Use the item / item menu |
/closebag |
Force-close the bag if the screen gets stuck (Config.CloseCommand) |
/x3dinv <id> |
Admin search of another player's bag (Config.AdminSearchCommand, groups in Config.SearchGroups) |
Config files
| File | Covers |
|---|---|
config.lua |
Language, keys/commands, feature switches (durability, weight, slot count, stack limit), give/drop/search, money, hotkeys, cooldowns |
config/catalog.lua |
Items: rarity, stack size, use/drop/give rules, descriptions |
config/weapons.lua |
Thai weapon names, weapon rarity/weight, equip/holster animations |
config/capacity.lua |
Starting slots/weight, upgrade coupons, Value Packs |
config/heldobjects.lua |
The item in the hand on give/receive/pick up/drop |
addons/hooks/*.lua |
Links to your other scripts (sell button, guide button, vehicle keys) |
Adding your own items
- Add the item to the ESX
itemstable - Put a lowercase PNG named after the item at
web/build/img/items/<item>.png(92×92, transparent background recommended) - Optionally set its rarity and description in
config/catalog.lua:
Config.ItemRarity = { ['my_item'] = 2 }
Config.Descriptions = { item = { ['my_item'] = { th = 'ไอเทมของฉัน', en = 'My item' } } }
Vaults, trunks and other storage scripts
A storage script calls 3 client exports. The bag then fires the server events you named when the player drags items in or out or closes the panel. Saving and permission checks stay in your storage script:
exports.x3d_inventory:SetCurrentVaultData({
events = { store = 'myvault:store', take = 'myvault:take', close = 'myvault:close' },
args = { vaultId },
})
exports.x3d_inventory:UpdateStorageData({ inventory = items, label = 'Vault', weight = 10, maxWeight = 100 })
exports.x3d_inventory:OpenStorage()
The server receives (...args, { name, label, count, weight }). No events = the bag refuses the drag, so nothing is lost.
Durability from other scripts
exports.x3d_inventory:RegisterDurabilityProvider('pickaxe', function(proxy, raw)
return { dur = 70, max = 100 } -- or return a number 0–100
end)
Weapon skins (X3D Weapon Skins)
With X3D Weapon Skins running, the bag supports skins with nothing to configure (it reads GlobalState.x3dWeaponSkins, no dependency):
- "Change skin" in the weapon's right-click menu and a "Skins" button in the bag header
- A skin tag on the slot, and tooltip rows showing which weapon it is a skin of and its damage
- After a skin change the weapon stays in hand and hotkeys follow
In X3D Weapon Skins, set Config.ImagePath to nui://x3d_inventory/web/build/img/items/%s.png and Hooks.CanCarry to exports.x3d_inventory:CanCarryItemSrc.
Exports
Client: OpenInventory CloseInventory IsInventoryOpen OpenStorage CloseStorage SetCurrentVaultData UpdateStorageData HideQuickSlots ShowQuickSlots Notify
Server: GetPlayerInventory CanCarryItem GetFreeSlots CheckItemFit GetCapacity AddSlots AddWeight GrantValuePack HasValuePack RegisterDurabilityProvider