# Config

## Default Config

***

{% code lineNumbers="true" fullWidth="false" %}

```lua
Config = {}

Config.Shops = {
    {
        name = 'Sklep 24/7',
        categories = {
            { name = 'food', icon = 'fa-solid fa-apple-alt', label = 'Food' },
            { name = 'drinks', icon = 'fa-solid fa-bottle-water', label = 'Napoje' },
            { name = 'tools', icon = 'fa-solid fa-tools', label = 'Narzędzia' },
            { name = 'electronics', icon = 'fa-solid fa-laptop', label = 'Elektronika' },
        },
        shop = {
            { label = 'Burger', item = 'burger', cost = 500, category = 'food'},
            { label = 'Sprunk', item = 'sprunk', cost = 10, category = 'drinks'},
            { label = 'Chleb', item = 'bread', cost = 15, category = 'food'},
            { label = 'Phone', item = 'phone', cost = 1200, category = 'electronics'},
            { label = 'Radio', item = 'radio', cost = 100, category = 'tools'},
        },
        locations = {
            blips = {
                { coords = vector3(29.6717, -1345.2014, 29.4970), sprite = 52, color = 2, scale = 0.8, label = "Sklep 24/7" }
            },
            peds = {
                { coords = vector4(24.4710, -1345.7262, 29.4970, 271.8526), model = "a_f_m_beach_01", heading = 90.0, scenario = "WORLD_HUMAN_STAND_IMPATIENT", target = { label = 'Otwórz Sklep', icon = 'fa-solid fa-store', distance = 2.0, } }
            },
            targets = {
                { coords = vector3(25.7102, -1347.8430, 29.4970), label = 'Otwórz Sklep', icon = 'fa-solid fa-store', distance = 2.0, size = vec3(2, 2, 2), rotation = 0.0, debug = false}
            }
        }
    },
    {
        name = 'Ammu-Nation',
        group = { 'police', 'ambulance' },
        categories = {
            { name = 'weapons', icon = 'fa-solid fa-gun', label = 'Broń' },
            { name = 'ammo', icon = 'fa-solid fa-list', label = 'Amunicja' },
            { name = 'accessories', icon = 'fa-solid fa-tools', label = 'Akcesoria' }
        },
        shop = {
            { label = 'Pistolet', item = 'weapon_pistol', cost = 2500, category = 'weapons', metadata = { license = 'weapon', serialnumber = '532987523975732' } },
            { label = 'Strzelba', item = 'WEAPON_PUMPSHOTGUN_MK2', cost = 5000, category = 'weapons' },
            { label = 'Amunicja 9mm', item = 'ammo-9', cost = 100, category = 'ammo' },
            { label = 'Amunicja shotgun', item = 'ammo-shotgun', cost = 200, category = 'ammo' },
            { label = 'Latarka do broni', item = 'weapon_flashlight', cost = 300, category = 'accessories' }
    
            },
        locations = {
            blips = {
                { coords = vector3(20.8517, -1104.8076, 29.7970), sprite = 110, color = 1, scale = 0.8, label = "Ammu-Nation" }
            },
            peds = {
                { coords = vector3(20.8517, -1104.8076, 29.7970), model = "hc_gunman", heading = 20.0, scenario = "WORLD_HUMAN_GUARD_STAND", target = { label = 'Otwórz Ammu-Nation', icon = 'fa-solid fa-store', distance = 2.0, } }
            },
            targets = {
                { coords = vector3(22.8129, -1106.9764, 29.7970), label = 'Otwórz Ammu-Nation', icon = 'fa-solid fa-gun', distance = 2.0, size = vec3(2, 2, 2), rotation = 0.0, debug = true }
            }
        }
    },
    {
        name = 'Sklep Medyczny',
        group = { 'police', 'ambulance' },
        categories = {
            { name = 'meds', icon = 'fa-solid fa-kit-medical', label = 'Medycyna' },
            { name = 'tools', icon = 'fa-solid fa-stethoscope', label = 'Sprzęt' }
        },
        shop = {
            { label = 'Apteczka', item = 'medkit', cost = 250, category = 'meds' },
            { label = 'Bandaż', item = 'bandage', cost = 50, category = 'meds' },
            { label = 'Defibrylator', item = 'defibrillator', cost = 1500, category = 'tools' },
            { label = 'Tabletki przeciwbólowe', item = 'painkillers', cost = 100, category = 'meds' }
        },
        locations = {
            blips = {
                { coords = vector3(298.2537, -587.2862, 43.2608), sprite = 153, color = 3, scale = 0.8, label = "Sklep Medyczny" }
            },
            ped = {
                { coords = vector3(298.2537, -587.2862, 43.2608), model = "s_m_m_doctor_01", heading = 0.0, scenario = "WORLD_HUMAN_CLIPBOARD" }
            },
            targets = {
                { coords = vector3(298.2537, -587.2862, 43.2608), label = 'Otwórz Sklep Medyczny', icon = 'fa-solid fa-kit-medical', distance = 2.0 }
            }
        }
    }
}
```

{% endcode %}

***

## Config Functions

<details>

<summary>Allowed Jobs ( Optional )</summary>

* **group `table`**&#x20;

```lua
group = { 'police', 'ambulance' },
```

</details>

***

<details>

<summary>Shop name <strong>( Require )</strong></summary>

* name `string`&#x20;

```lua
name = 'Sklep 24/7',
```

</details>

***

<details>

<summary><strong>Categories ( Require )</strong></summary>

* options `table`&#x20;
* options:
  * name `string`&#x20;
  * icon `string`  - <https://fontawesome.com/icons>
  * label `string`&#x20;

```lua
categories = {
            { name = 'food', icon = 'fa-solid fa-apple-alt', label = 'Food' },
            { name = 'drinks', icon = 'fa-solid fa-bottle-water', label = 'Napoje' },
            { name = 'tools', icon = 'fa-solid fa-tools', label = 'Narzędzia' },
            { name = 'electronics', icon = 'fa-solid fa-laptop', label = 'Elektronika' },
},
```

</details>

***

<details>

<summary>Products <strong>( Require )</strong></summary>

* options `table`&#x20;
* options:
  * label `string`&#x20;
  * item `string`&#x20;
  * category `string` - Category with Categories table
  * metadata `table`&#x20;
    * license  `string`&#x20;
    * SOON MORE **( tell us what we can add )**

```lua
shop = {
            { label = 'Pistolet', item = 'weapon_pistol', cost = 2500, category = 'weapons', metadata = { license = 'weapon'} },
},
```

</details>

***

<details>

<summary>Locations ( Require ) </summary>

* blips `table`&#x20;

  * coords `vector3`&#x20;
  * sprite `number` &#x20;
  * color `number`&#x20;
  * scale `number`&#x20;
  * label `string`&#x20;

  check <https://docs.fivem.net/docs/game-references/blips/>

```lua
blips = {
            { coords = vector3(20.8517, -1104.8076, 29.7970), sprite = 110, color = 1, scale = 0.8, label = "Ammu-Nation" }
},
```

***

* peds `table`&#x20;

  * coords `vector3`&#x20;
  * model  `string`&#x20;
  * heading `number`
  * scenario  `string`&#x20;
  * target ( optional ) `table`&#x20;
    * label `string`&#x20;
    * icon `string`&#x20;
    * distance `number`&#x20;

  check <https://docs.fivem.net/docs/game-references/ped-models/>

```lua
peds = {
                { coords = vector3(20.8517, -1104.8076, 29.7970), model = "hc_gunman", heading = 20.0, scenario = "WORLD_HUMAN_GUARD_STAND", target = { label = 'Otwórz Ammu-Nation', icon = 'fa-solid fa-store', distance = 2.0, } }
},
```

***

* targets `table`&#x20;
  * coords `vector3`&#x20;
  * label `string`&#x20;
  * icon `string`&#x20;
  * distance `number`&#x20;
  * size `vector3`&#x20;
  * rotation `number`&#x20;
  * debug `boolean`&#x20;

```lua
targets = {
                { coords = vector3(22.8129, -1106.9764, 29.7970), label = 'Otwórz Ammu-Nation', icon = 'fa-solid fa-gun', distance = 2.0, size = vec3(2, 2, 2), rotation = 0.0, debug = true }
}
```

</details>
