# Configuration Files

## 1. Adjust config.lua to your server core

{% tabs %}
{% tab title="ESX" %}

1. Adjusting the script to your server core

```lua
Config.Core = "ESX"
Config.CoreExport = function()
    return exports['es_extended']:getSharedObject()
end
```

2. Adjusting the PlayerLoaded trigger from server core to the script

```lua
Config.PlayerLoaded = "esx:playerLoaded"
```

3. Adjusting the PlayerLogoutServer trigger from server core to the script

```lua
Config.PlayerLogoutServer = "esx:playerDropped"
```

{% endtab %}

{% tab title="QB-Core" %}

1. Adjusting the script to your server core

```lua
Config.Core = "QB-Core"
Config.CoreExport = function()
    return exports['qb-core']:GetCoreObject()
end
```

2. Adjusting the PlayerLoaded trigger from server core to the script

```lua
Config.PlayerLoaded = "QBCore:Client:OnPlayerLoaded"
```

3. Adjusting the PlayerLogoutServer trigger from server core to the script

```lua
Config.PlayerLogoutServer = "QBCore:Server:OnPlayerUnload"
```

{% endtab %}
{% endtabs %}

## 2. Adjust config.lua to server preferences

{% tabs %}
{% tab title="Preferences" %}
If you want to use a progress-bar for the exercises you are doing, you can do so below.\
You can adjust your own progress bar in the  config.client.lua - `CL.Progressbar`

```lua
Config.UseProgressbar = true
```

Do you want to use target system, you can adjust other one in the config.client.lua - `CL.Target`

```lua
Config.UseTarget = false
Config.TargetResource = 'ox_target' -- Prepared for 'ox_target', 'qb-target'
```

Adjusting the display of points

```lua
Config.UseMarkers = true -- Using a marker to display points
Config.UseText3D = false -- Using a 3D Text to display points
Config.UseHelpNotify = true -- Using a ESX.ShowHelpNotification (only for esx)
```

Set the maximum and minimum number of item purchases per purchase

```lua
Config.MaxItemsWithoutBasket = 20
Config.MaxItemsInBasket = 100
```

You can block the ability to run with the package while the goods are being delivered to the store

```lua
Config.DisableRunWithBoxInHands = true
```

Limit of stores to be owned by one player

```lua
-- -1 = Unlimited
-- 0 = No player can buy
Config.StoresLimitPerPlayer = -1
```

Do you want to prevent the employment of a player who has another job, if so, you can require the employment of only the person who has a job for example - unemployed

```lua
Config.RequiredJobToBeHired = 'unemployed'
```

Prevent multiple purchases of products by the same person so that fiends don't scoop up product sales for their own store

```lua
Config.PurchasesTimeout = 3600 -- 3600 seconds = 1 hour
```

{% endtab %}
{% endtabs %}

## 3. Adjust config.storemanage.lua to server preferences

{% tabs %}
{% tab title="Preferences" %}
Cost of buying the Alarm & Monitoring

```lua
Config.AlarmPrice = 100000
```

The cost of transporting money safely

```lua
Config.MoneyEscortPrice = 2500
```

Costs and insurance times for stores

```lua
Config.Insurances = {
    [1] = {days = 7, price = 30000},
    [2] = {days = 30, price = 150000},
    [3] = {days = 90, price = 400000},
}
```

Times after which stores receive a warning and are removed for inactivity of employees

```lua
Config.TerminationTime = {
    ['critical'] = 168, -- After this time, the store will be removed for inactivity
    ['warning'] = 72 -- After this time, the player will receive information in the management menu after the remaining time to remove the store for inactivity
}
```

If a store has x% of products in stock, it will not be subject to Config.TerminationTime, it will be omitted from the liquidation time

```lua
Config.TerminationExclusionProductsPercent = 80
```

If a gasstation has x% of fuel in stock, it will not be subject to Config.TerminationTime, it will be omitted from the liquidation time

```lua
Config.TerminationExclusionFuelPercent = 70
```

For what % a player can sell his business

```lua
Config.AutomaticSellPercentageFromPrice = 40
```

Employee to be able to create new order to take care of business

```lua
Config.AbilityEmployeesToCreateOrders = true
```

What it will give to the store for the upgrade, here you can adjust the values that stores will be able to use at the concurrent upgrade level

```lua
Config.LevelsBenefits = {
    ['1'] = {
        itemsCapacity = 300,
        fuelCapacity = 2500,
        moneyMarginItems = 55,
        moneyMarginFuel = 55,
        quantityProducts = {15, 25, 50},
        quantityFuel = {30, 50, 150},
        levelup = {
            -- type: 'sell_products', 'sell_fuel', 'make_orders', 'required_money'
            ['sell_products'] = {type = 'sell_products', count = 5000},
            ['sell_fuel'] = {type = 'sell_fuel', count = 7500},
            ['make_orders'] = {type = 'make_orders', count = 120},
            ['required_money'] = {type = 'required_money', count = 50000},
        },
    },
    ['2'] = {
        itemsCapacity = 500,
        fuelCapacity = 4000,
        moneyMarginItems = 75,
        moneyMarginFuel = 75,
        quantityProducts = {15, 25, 50, 75},
        quantityFuel = {30, 50, 150, 220},
        levelup = {
            ['sell_products'] = {type = 'sell_products', count = 10000},
            ['sell_fuel'] = {type = 'sell_fuel', count = 17500},
            ['make_orders'] = {type = 'make_orders', count = 250},
            ['required_money'] = {type = 'required_money', count = 100000},
        },
    },
    ['3'] = {
        itemsCapacity = 750,
        fuelCapacity = 7500,
        moneyMarginItems = 90,
        moneyMarginFuel = 90,
        quantityProducts = {15, 25, 50, 75, 100},
        quantityFuel = {30, 50, 150, 220, 300},
    },
}
```

{% endtab %}
{% endtabs %}


---

# 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://docs.vames-store.com/assets/vms_stores/configuration-files.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.
