ox_inventory is the backbone of most modern FiveM servers, so when it misbehaves, everything feels broken. Here are the most common ox_inventory problems and how to fix each.
Problem 1: Inventory won't open at all
If pressing the inventory key does nothing:
- Check dependencies. ox_inventory needs
ox_libandoxmysql, loaded *before* it. Confirm they're started and error-free in the console. - Check the console for errors on startup โ a failed load usually prints a clear reason.
- Verify the SQL ran. ox_inventory needs its database tables. If you skipped the SQL import, it won't work. Run the provided SQL file.
- Keybind conflict. Another resource may be grabbing the same key. Check your keybinds.
Problem 2: Items not showing / "out of your inventory"
If the inventory opens but items are missing or won't add:
- Item not defined. Every item must exist in ox_inventory's items data. If you're adding a custom item and it's not registered, it won't appear. Add it to the items definition.
- Framework bridge issue. If ox_inventory isn't correctly linked to your QBCore/ESX framework, item data won't sync. Confirm the integration is set up per the docs.
- Database not saving. If items vanish on relog, the database write is failing โ check your oxmysql connection.
Problem 3: Item images missing (blank squares)
This is extremely common and almost always the same cause:
- The image file doesn't exist. ox_inventory looks for a
.pngin its images folder matching the item name exactly. If the item isburgerbut there's noburger.png, you get a blank. - Fix: Add a correctly-named PNG to
ox_inventory/web/images/. The filename must match the item name exactly (case-sensitive), e.g.burger.pngfor itemburger. - After adding images, restart the resource.
Problem 4: Errors mentioning oxmysql or the database
- Connection string wrong. Check your
mysql_connection_stringin server.cfg points to the right database with correct credentials. - Database server down. Make sure MySQL/MariaDB is actually running.
- Our oxmysql connection guide covers this fully.
Problem 5: Conflicts with another inventory
Running ox_inventory *and* qb-inventory (or another) at the same time causes chaos โ they fight over the same events.
Fix: Pick one inventory. Disable the other completely (remove its ensure line). You can't run two.
The diagnosis checklist
- Read the console โ most ox_inventory failures print a clear error.
- Confirm dependencies (
ox_lib,oxmysql) load first and cleanly. - Verify the SQL was imported.
- Check item definitions for missing items.
- Check image filenames match item names exactly.
- Ensure no second inventory is running.
Building on a clean foundation
Many ox_inventory headaches come from scripts that integrate with it badly. Well-built resources hook into ox_inventory cleanly and document exactly what they need. At Viper Development, our scripts are built for the modern ox stack and integrate properly โ with docs and support if you hit a snag. Browse our scripts โ.