# Setting up store

{% stepper %}
{% step %}

#### Go to config.lua

You can easily configure or add a new store to our script by accessing the following directory: `brnx-iceorinksystem/modules/shared/config.lua`. This file provides all the necessary options for customization, ensuring a seamless integration tailored to your needs.
{% endstep %}

{% step %}

#### Create control

### **How to Configure the Store System**

The `config.store` defines shop points where players can buy tickets and ice skates.

**🔧 Structure:**

**1. enabled**

Enables or disables the entire store system.

{% code title="brnx-iceorinksystem/modules/shared/config.lua" %}

```lua
enabled = true
```

{% endcode %}

**2. config**

Defines custom descriptions for each shop (used in UI).

{% code title="brnx-iceorinksystem/modules/shared/config.lua" %}

```lua
config = {
    ['reception'] = {
        description = 'Here you can buy tickets and equipment to have fun on our skating rink.'
    },
    ['skates'] = {
        description = 'Here you can buy tickets and equipment to have fun on our skating rink.'
    }
}
```

{% endcode %}

**3. items**

Specifies the items for sale in each store. Each item includes:

* `item`: internal inventory name.
* `label`: display name.
* `image`: image path for the shop UI.
* `price`: price in the server currency.

{% code title="brnx-iceorinksystem/modules/shared/config.lua" %}

```lua
items = {
    ['reception'] = {
        { item = 'ticket_iceorink', label = 'Ticket', image = '../images/ticket_iceorink.png', price = 500 }
    },
    ['skates'] = {
        { item = 'iceskates_white', label = 'Ice Skates (White)', image = '../images/iceskates_white.png', price = 500 },
        -- other skates...
    }
}
```

{% endcode %}

**4. locations**

Sets up the in-world locations for stores:

* `coords`: position (vector3).
* `distance`: interaction range.
* `config`: shop type name (must match `items` and `config` sections).

{% code title="brnx-iceorinksystem/modules/shared/config.lua" %}

```lua
locations = {
    { coords = vector3(-143.45, -246.28, 44.09), distance = 2.0, config = 'reception' },
    { coords = vector3(-159.68, -237.22, 44.09), distance = 2.0, config = 'skates' },
    -- more entries...
}
```

{% endcode %}
{% endstep %}
{% endstepper %}
