How to add new item​
QBCore​
To add new items to qbcore, follow these steps:
- Open
qb-core/shared/items.lua
(MAKE BACKUP BEFORE EDITING!) - Add the correct line of code of a similar item (copy & paste similar line of code) and edit the item details such as weight, description and so on… then save changes.
- Drag & Drop the
filename.png
intoqb-inventory/html/images
folder.
["ring1"] = {
["name"] = "ring1",
["label"] = "A ring?",
["weight"] = 1000,
["type"] = "item",
["image"] = "ring1.png",
["unique"] = true,
["useable"] = true,
["shouldClose"] = true,
["combinable"] = nil,
["description"] = "The One Ring appeared perfectly plain and featureless, but when heated, the inscription appeared in fiery letters on the Ring."
},
ESX​
- Open
ox_inventory/data/items.lua
and add the item name, label, weight and other options. Save the changes. - Drag & Drop the
filename.png
intoox_inventory/html/img/items
folder.
['pizza'] = {
label = 'Pizza',
weight = 500,
stack = true,
close = true,
}