# 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

1. Go to `ox_inventory/modules/items/containers.lua`
2. Insert this code at the end of the file, you can change slots count and maxWeight to your needs:

```lua
setContainerProperties('xmas_gift', {
    slots = 5,
    maxWeight = 4000,
    blacklist = { 'xmas_gift', 'xmas_packed_gift' }
})

return containers
```

3. Go to `ox_inventory/data/items.lua`
4. Insert these items:

```lua
    ['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'
    }
```

5. Copy images from `rcore_xmas/assets/inventory_images/` to `ox_inventory/web/images/`
6. Go to server console and type `ensure ox_inventory`, `ensure rcore_xmas`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.rcore.cz/paid-resources/rcore_xmas/inventories/ox_inventory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
