Get started
Items and inventory
uniqers-christmasPage 3 of 234 topicsUpdated recently
The script uses seven items. Copy the PNG files from uniqers-christmas/inventory_images/ into your inventory's image folder (qb-inventory/html/images/, ox_inventory/web/images/ ...).
01QBCore
qb-core/shared/items.lua:
lua
['snowball'] = { ['name'] = 'snowball', ['label'] = 'Snowball', ['weight'] = 100, ['type'] = 'item', ['image'] = 'snowball.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'A snowball.' },['bigsnowball'] = { ['name'] = 'bigsnowball', ['label'] = 'Big Snowball', ['weight'] = 500, ['type'] = 'item', ['image'] = 'bigsnowball.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'A big snowball to build snowmen.' },['krampusbullet'] = { ['name'] = 'krampusbullet', ['label'] = 'Krampus Bullet', ['weight'] = 50, ['type'] = 'item', ['image'] = 'krampusbullet.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Special ammo for the Krampus hunt.' },['krampusvisionpills'] = { ['name'] = 'krampusvisionpills', ['label'] = 'Krampus Vision Pill', ['weight'] = 20, ['type'] = 'item', ['image'] = 'krampusvisionpills.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Lets you see the hidden Krampus.' },['emfreader'] = { ['name'] = 'emfreader', ['label'] = 'Krampus Tracker', ['weight'] = 500, ['type'] = 'item', ['image'] = 'emfreader.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = false, ['description'] = 'Tracks the Krampus.' },['christmasgift'] = { ['name'] = 'christmasgift', ['label'] = 'Christmas Gift', ['weight'] = 100, ['type'] = 'item', ['image'] = 'christmasgift.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['description'] = 'Give it to another player.' },['krampusgift'] = { ['name'] = 'krampusgift', ['label'] = 'Krampus Gift', ['weight'] = 50, ['type'] = 'item', ['image'] = 'krampusgift.png', ['unique'] = false, ['useable'] = false, ['shouldClose'] = true, ['description'] = 'Loot from the Krampus. Exchange it for cookies.' },02ESX
Run in your database:
sql
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES('snowball', 'Snowball', 1, 0, 1),('bigsnowball', 'Big Snowball', 1, 0, 1),('krampusbullet', 'Krampus Bullet', 1, 0, 1),('krampusvisionpills', 'Krampus Vision Pill', 1, 0, 1),('emfreader', 'Krampus Tracker', 1, 0, 1),('christmasgift', 'Christmas Gift', 1, 0, 1),('krampusgift', 'Krampus Gift', 1, 0, 1);03ox_inventory
ox_inventory/data/items.lua:
lua
["snowball"] = { label = "Snowball", weight = 100, stack = true, close = true },["bigsnowball"] = { label = "Big Snowball", weight = 500, stack = true, close = true },["krampusbullet"] = { label = "Krampus Bullet", weight = 50, stack = true, close = true },["krampusvisionpills"] = { label = "Krampus Vision Pill", weight = 20, stack = true, close = true },["emfreader"] = { label = "Krampus Tracker", weight = 500, stack = true, close = false },["christmasgift"] = { label = "Christmas Gift", weight = 100, stack = true, close = true },["krampusgift"] = { label = "Krampus Gift", weight = 50, stack = true, close = true },04Image path
The menu shows item pictures from your inventory. Point Config.InventoryImagePath at it:
Note
Event weapons (invasion loadout, snowballs in the snowball fight) are not inventory items. They are handed out and taken back by the script, so they never end up in an inventory and cannot be duplicated.
Still stuck? Send us your server log on Discord and we will sort it out with you.
Ask on Discord