Cómo se hace

Install ox_inventory in FiveM

Complete guide to installing overextended's ox_inventory: dependencies (oxmysql + ox_lib), importing the SQL, the correct ensure order, and configuring it for ESX and QBCore.

The problem

You want to replace your server's default inventory with ox_inventory, but you don't know which dependencies it needs, what order to load it in, or how to make it work with ESX or QBCore. After copying the resource, the inventory won't open, items don't exist, or the console throws oxmysql/ox_lib errors.

The cause

ox_inventory doesn't work on its own: it needs oxmysql to persist the stash/inventory in the database and ox_lib for its UI, callbacks and utilities. If the ensure order is wrong (oxmysql or ox_lib load after ox_inventory), or if you don't point it at your framework (ESX/QBCore), the resource only partly starts or can't resolve the player.

The solution

Install the dependencies in order, import the ox_inventory SQL and declare the framework. The ensure order causes most failures: oxmysql → ox_lib → ox_inventory → your framework/bridge.

cfg
## server.cfgcritical load (ensure) order
## 1) Database first: ox_inventory persists everything via oxmysql
ensure oxmysql
## 2) Utility/UI library that ox_inventory relies on
ensure ox_lib
## 3) The inventory, now that its dependencies are ready
ensure ox_inventory
## 4) Your framework / bridge (ESX or QBCore)
ensure es_extended      ## or: ensure qb-core

## Configure the framework in ox_inventory:
##   ox_inventory/data/  +  setr inventory:framework in your cfg, e.g.:
setr inventory:framework "esx"   ## typical values: "esx" | "qb"
## After editing SQL or items, restart the WHOLE SERVER, not just the resource.

Step by step

  1. 1.Install the dependencies: download oxmysql and ox_lib (both from overextended) and drop them into resources/. ox_inventory won't start without them.
  2. 2.Download ox_inventory from overextended's official repo (github.com/overextended/ox_inventory). Use a stable release, not the main branch, if your FXServer build is old.
  3. 3.Import the SQL: run the .sql file bundled with ox_inventory (it creates the ox_inventory, stashes, etc. tables) into your database before starting.
  4. 4.Place the resources in the correct ensure order in server.cfg: oxmysql → ox_lib → ox_inventory → your framework (es_extended or qb-core).
  5. 5.Point it at your framework: ox_inventory auto-detects ESX or QBCore, but confirm it in its config (data/ or the inventory:framework convar) so it resolves the player correctly.
  6. 6.Define your items in ox_inventory/data/items.lua (name, label, weight, stack, close, description). ox_inventory uses ITS OWN item list, not your framework's.
  7. 7.Add each item's image in ox_inventory/web/images with the same name as the item (e.g. water.png for the "water" item), otherwise they'll show blank.
  8. 8.Use the server exports to manipulate inventories: exports.ox_inventory:AddItem(source, 'water', 1), :Search(source, 'count', 'water') and :GetItem(source, 'water', nil, true).
  9. 9.Restart the whole server (not just the resource) and open the inventory in game to confirm it loads, moves items and persists after reconnecting.

Different case?

Paste your error in the AI tool and get the fix instantly.

Try the tool

Related guides

Last updated: 2026-06-29. Crxative-M is not affiliated with Cfx.re or Rockstar Games.

How to install ox_inventory in FiveM (ESX & QBCore) step by step