Skip to content

Core Inventory

Requirements

Framework
QBCoreESXQBX
Database
MySQL

Setup

1
Add the Resource

Place core_inventory into your server's resources folder.

resources/
  [c8re]/
    core_inventory/
2
Import the Database

Execute the SQL file included with the resource:

sql
-- Run this in your database
SOURCE core_inventory.sql;

Or import core_inventory.sql through your database management tool (HeidiSQL, phpMyAdmin, etc).

This creates the coreinventories table with the required primary key constraint and adds the inventorysettings column to your players/users table.

TIP

The script can auto-create tables if EnableDatabaseAutoCreation is set to true in config — but running the SQL manually is recommended for first-time setup.

3
Configure the Framework

Open config.lua and set your framework:

lua
Config = {
    Framework = 'qb-core',              -- 'qb-core' or 'esx'
    FrameworkResource = 'qb-core',      -- Resource name of your framework
    NewFrameworkVersion = true,          -- ESX only: set false for versions < 1.8
}
4
Framework-Specific Setup

Choose your framework below and follow the specific setup instructions:

Core Inventory works out of the box with QBCore — no extra setup needed. Just add your items to qb-core/shared/items.lua using the fields described in Item Structure.

1. Add Items

Copy the contents of [items]/QB/required items.lua into your qb-core/shared/items.lua

2. Add Weapons

Copy the contents of [items]/QB/weapons.lua into your qb-core/shared/items.lua

3. Add Attachments

Choose one of the attachment files from [items]/QB/attachments/ based on your config_weapons.lua setup:

  • attachments_by_category.lua — if UniqueComponentByWeaponCategory = true (default)
  • attachments.lua — if UniqueComponent = true
  • attachments_shared.lua — if SharedComponentForAllWeapons = true

WARNING

Reloading core_inventory at runtime (e.g. ensure core_inventory) can cause errors with the default qb-core. Use our modified qb-core fork which routes inventory calls directly, so everything survives resource restarts.

C8RE qb-core
Modified qb-core with built-in core_inventory support — replace your existing qb-core with this
5
Start the Resource

Add to your server.cfg after your framework and oxmysql:

cfg
ensure oxmysql
ensure qb-core
ensure core_inventory

DANGER

oxmysql must start before core_inventory. The script requires it for all database operations.

WARNING

Remove any other inventory script (qb-inventory, ox_inventory, etc.) from your server.cfg to avoid conflicts. Core Inventory provides qb-inventory compatibility automatically.

6
Verify
  1. Start your server
  2. Join and check for any errors in the console
  3. Press TAB (default) to open the inventory
  4. Check that items, clothing slots, and weapon holders appear correctly

Item Data Override

For real-time item editing without restarts:

lua
ItemsDataOverride = true, -- Edit items in-game via C8RE Tools

When enabled, use the /core_inventory command to open the C8RE Tools panel and edit item properties live.