# 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 PlayerLoadedServer trigger from server core to the script

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

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

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

5. Adjusting the JobUpdated trigger from server core to the script

```lua
Config.JobUpdated = "esx:setJob"
```

6. Adjust the Menu to your menu script

```lua
Config.Menu = 'esx_context' -- 'esx_menu_default' / 'esx_context' / 'ox_lib'
Config.ESXMenuDefault_Align = 'right'
```

7. Adjusting GetClosestPlayersFunction to your core

```lua
Config.GetClosestPlayersFunction = function()
    local playerInArea = ESX.Game.GetPlayersInArea(GetEntityCoords(PlayerPedId()), 10.0) -- For ESX
    return playerInArea
end
```

{% 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 PlayerLoadedServer trigger from server core to the script

```lua
Config.PlayerLoadedServer = "QBCore:Server:OnPlayerLoaded"
```

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

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

5. Adjusting the JobUpdated trigger from server core to the script

```lua
Config.JobUpdated = "QBCore:Client:OnJobUpdate"
```

6. Adjust the Menu to your menu script

```lua
Config.Menu = 'qb-menu' -- 'qb-menu' / 'ox_lib'
Config.ESXMenuDefault_Align = 'right'
```

7. Adjusting GetClosestPlayersFunction to your core

```lua
Config.GetClosestPlayersFunction = function()
    local playerInArea = QBCore.Functions.GetPlayersFromCoords(GetEntityCoords(PlayerPedId()), 10.0) -- For QB-CORE
    return playerInArea
end
```

{% endtab %}
{% endtabs %}

##

## 2. Adjust config.lua to server preferences

{% tabs %}
{% tab title="Preferences" %}
1\.

```lua
Config.DistanceView = 2.25
Config.DistanceAccess = 0.5
Config.UseMarkers = true
Config.Use3DText = false
Config.UseHelpNotify = true
```

***

2. **Target**: If you use a target, markers for gym activities will not be displayed - the marker will remain for the boss menu

```lua
Config.UseTarget = false
Config.TargetResource = 'ox_target'
```

***

3. **EnableMemberships**: If you use in any gym the required membership, run it then it will work correctly reading memberships

```lua
Config.EnableMemberships = true -- true or false
```

***

4. **EnableGiveMembership**: Allows employees to give gym memberships.

```lua
Config.EnableGiveMembership = true -- true or false
```

***

5. **EnableStrenghtModifier**: In the config.client.lua file, you can modify the player's hitting power with certain power stats.

{% hint style="warning" %}
**IF YOUR ANTI-CHEAT BANS FOR STRENGHT MODIFICATION YOU NEED TO SET THIS OPTION TO FALSE OR MAKE A CHANGE IN THE ANTI-CHEAT**
{% endhint %}

```lua
Config.EnableStrenghtModifier = true -- true or false
```

***

6. **EnableRunSpeedModifier**: In the config.client.lua file, you can modify the player's running speed with certain condition stats.

{% hint style="warning" %}
**IF YOUR ANTI-CHEAT BANS FOR RUN MODIFICATION YOU NEED TO SET THIS OPTION TO FALSE OR MAKE A CHANGE IN THE ANTI-CHEAT**
{% endhint %}

```lua
Config.EnableRunSpeedModifier = true -- true or false
```

***

7. **EnableStaminaModifier**: In the config.client.lua file, you can modify the player's stamina level with certain condition stats.

```lua
Config.EnableStaminaModifier = true -- true or false
```

***

8. **AutoMembershipForEmployees**: Every gym employee will have a gym membership with no requirement to buy one

```lua
Config.AutoMembershipForEmployees = true -- true or false
```

***

9. **UseCustomQuestionMenu**: if you want to use for example vms\_notify Question Menu, set it true, if you want to use Config.Menu to accept / reject of buying membership

```lua
Config.UseCustomQuestionMenu = false -- true or false
```

***

10. **UseProgressbar**: If you want to use a progress-bar for the exercises you are doing, you can do so below.

```lua
Config.UseProgressbar = false -- true or false
Config.Progressbar = function(actionName, time)
    exports['progressbar']:Progress({
        name = actionName,
        label = Config.Translate[Config.Language]["progressbar."..actionName],
        duration = time,
        canCancel = false,
        controlDisables = {
            disableMouse = false,
            disableMovement = true,
            disableCarMovement = true,
            disableCombat = true,
        }
    })
end
```

***

10. **UseSkillbar**: If you want to use a skill-bar for the exercises you are doing, you can do so below.

```lua
Config.UseSkillbar = false -- true or false
Config.Skillbar = function(actionName, cb)
    local finished = exports["tgiann-skillbar"]:taskBar(3000)
    cb(finished)
end
```

***

10. **StatisticsMenu**:

```lua
Config.StatisticsMenu = {
    ['strenght'] = true, -- true or false
    ['condition'] = true, -- true or false
    ['shooting'] = true, -- true or false
    ['driving'] = true, -- true or false
    ['flying'] = true, -- true or false
}
```

{% 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_gym/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.
