OX Inventory
Usage
The xmas_gift item in your inventory functions as a container. Open it, place items inside, right-click on it, press Pack and a input dialog will open where you can enter your nametag. After confirmation, you will receive a wrapped gift.
Setup
Go to
ox_inventory/modules/items/containers.luaInsert this code at the end of the file, you can change slots count and maxWeight to your needs:
setContainerProperties('xmas_gift', {
slots = 5,
maxWeight = 4000,
blacklist = { 'xmas_gift', 'xmas_packed_gift' }
})
return containersGo to
ox_inventory/data/items.luaInsert these items:
['xmas_gift'] = {
label = 'Unpacked Gift',
weight = 100,
stack = false,
close = true,
consume = 0,
server = {
export = 'rcore_xmas.xmas_gift'
},
buttons = {
{
label = 'Pack',
action = function(slot)
TriggerEvent('rcore_xmas:gifts:nametag', slot)
end
}
}
},
['xmas_packed_gift'] = {
label = 'Packed Gift',
weight = 250,
stack = false,
close = true,
consume = 0,
server = {
export = 'rcore_xmas.xmas_packed_gift',
}
},
['xmas_tree'] = {
label = 'Christmas Tree',
weight = 350,
stack = true,
close = true,
consume = 0,
server = {
export = 'rcore_xmas.xmas_tree'
}
},
['xmas_star'] = {
label = 'Christmas Star',
weight = 50,
stack = true,
close = true,
consume = 0,
export = 'rcore_xmas.xmas_star'
},
['xmas_decor'] = {
label = 'Christmas Decor',
weight = 50,
stack = true,
close = true,
consume = 0,
export = 'rcore_xmas.xmas_decor'
}Copy images from
rcore_xmas/assets/inventory_images/toox_inventory/web/images/Go to server console and type
ensure ox_inventory,ensure rcore_xmas
Last updated
Was this helpful?