Defining items in QBCore
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.

#The format
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' },
}| Field | Meaning |
|---|---|
name | Item ID (same as the key, lowercase) |
label | Display name |
weight | Weight in the inventory’s units (grams in the default setup) |
type | item or weapon |
ammotype | Weapons only: GTA ammo type, e.g. AMMO_PISTOL |
image | File in the inventory’s images folder |
unique | true = never stacks |
useable | Can be used from the inventory |
shouldClose | Close the inventory on use |
description | Tooltip text |
#Making an item usable
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
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.
Questions
How do I add an item in QBCore?
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?
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?
Ready to pick a map?
Twelve themes on three base map styles, $8 each, instant download.
Relevant to what you just read