# QB, LS, PJ Inventories

## Usage

Use the `xmas_gift` item in your inventory, put items in it, and then wrap it with the command `/packgift <nametag>`. You can enter a name tag that will appear in the gift description. You will then receive a wrapped gift.

## Setup

1. Go to `(qb-inventory/lj-inventory/ps-inventory)/server/main.lua`
2. Insert this code at the end of the file:

```lua
exports('GetStashItems', GetStashItems)
exports('RemoveFromStash', RemoveFromStash)   
exports('SaveStashItems', SaveStashItems)
```

3. Go to `qb-core/shared/items.lua`
4. Find item `weapon_snowball` and set `unique` to `false`
5. Insert these items:

```lua
    ['xmas_gift'] = {
        ['name'] = 'xmas_gift',
        ['label'] = 'Unpacked Gift',
        ['weight'] = 100,
        ['type'] = 'item',
        ['image'] = 'xmas_gift.png',
        ['unique'] = true,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil
    },
    ['xmas_packed_gift'] = {
        ['name'] = 'xmas_packed_gift',
        ['label'] = 'Packed Gift',
        ['weight'] = 250,
        ['type'] = 'item',
        ['image'] = 'xmas_packed_gift.png',
        ['unique'] = true,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil
    },
    ['xmas_tree'] = {
        ['name'] = 'xmas_tree',
        ['label'] = 'Christmas Tree',
        ['weight'] = 350,
        ['type'] = 'item',
        ['image'] = 'xmas_tree.png',
        ['unique'] = false,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil
    },
    ['xmas_star'] = {
        ['name'] = 'xmas_star',
        ['label'] = 'Christmas Star',
        ['weight'] = 50,
        ['type'] = 'item',
        ['image'] = 'xmas_star.png',
        ['unique'] = false,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil,
    },
    ['xmas_decor'] = {
        ['name'] = 'xmas_decor',
        ['label'] = 'Christmas Decor',
        ['weight'] = 50,
        ['type'] = 'item',
        ['image'] = 'xmas_decor.png',
        ['unique'] = false,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil,
    }
```

6. Copy images from `rcore_xmas/assets/inventory_images/` to `(qb-inventory/lj-inventory/ps-inventory)/html/images/`
7. Restart your server. **Server need to be restarted for proper registration of usable items!**
