Inventorybeginner9 min readupdated 11 Sept 2026

Defining items in QBCore

The short answer

Each entry in QBCore.Shared.Items has name, label, weight, type (item or weapon), image, unique, useable, shouldClose and description; weapon items add ammotype. Make an item usable with QBCore.Functions.CreateUseableItem, put its image in qb-inventory’s images folder, and add items from your own resource at runtime with exports['qb-core']:AddItem(name, data).

On a QBCore server with qb-inventory, every item — food, tools, documents and even weapons — starts as a line in qb-core/shared/items.lua. The format is compact, and a missing or mistyped field is behind most “item does not show” problems.

Defining items in QBCore — illustrated with a FiveM-compatible minimap render

#The format

qb-core/shared/items.lua
QBCore.Shared.Items = {
    pistol_ammo = { name = 'pistol_ammo', label = 'Pistol ammo', weight = 200, type = 'item', image = 'pistol_ammo.png', unique = false, useable = true, shouldClose = true, description = 'Ammo for Pistols' },
    weapon_pistol = { name = 'weapon_pistol', label = 'Walther P99', weight = 1000, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_pistol.png', unique = true, useable = false, description = 'A small firearm designed to be held in one hand' },
}
FieldMeaning
nameItem ID (same as the key, lowercase)
labelDisplay name
weightWeight in the inventory’s units (grams in the default setup)
typeitem or weapon
ammotypeWeapons only: GTA ammo type, e.g. AMMO_PISTOL
imageFile in the inventory’s images folder
uniquetrue = never stacks
useableCan be used from the inventory
shouldCloseClose the inventory on use
descriptionTooltip text

#Making an item usable

server.lua
local QBCore = exports['qb-core']:GetCoreObject()

QBCore.Functions.CreateUseableItem('pistol_ammo', function(source, item)
    TriggerClientEvent('weapons:client:AddAmmo', source, 'AMMO_PISTOL', 12, item)
end)

The event name above is what qb-weapons uses for ammo; for your own items trigger your own events. Scripting basics: QBCore tutorial.

#Adding items from your resource

server.lua (your resource)
exports['qb-core']:AddItems({
    fish = { name = 'fish', label = 'Fish', weight = 400, type = 'item', image = 'fish.png', unique = false, useable = false, shouldClose = false, description = 'Freshly caught' },
})

This keeps your resource self-contained instead of asking buyers to edit qb-core. Weapon definitions live in a separate table — see QBCore shared weapons.

Share this guideXRedditFacebook

Questions

How do I add an item in QBCore?
Add an entry to qb-core/shared/items.lua (or call exports['qb-core']:AddItem from your resource) and add its image to the inventory’s images folder.
Are weapons items in QBCore?
Yes — type = 'weapon' with an ammotype, plus an entry in shared/weapons.lua.
Why can I not use my item?
useable is false or no CreateUseableItem handler is registered.
What does unique mean?
The item never stacks; each one takes its own slot.

Ready to pick a map?

Twelve themes on three base map styles, $8 each, instant download.

Relevant to what you just read