# Common Errors

In this section, you will find answers to commonly encountered issues. Remember that most errors stem from incorrect configuration, lack of required resources, or insufficient modification.

Bear in mind that troubleshooting requires patience and precision. Try to carefully analyze the errors and systematically review possible solutions.

If the issue persists after verifying the configuration and available resources, please contact the support on the VMS Discord.

***

<details>

<summary>Chameleon color not working</summary>

1. Make sure you have updated your GTA 5 launcher
2. Make sure you are using the new [**game build**](https://docs.fivem.net/docs/server-manual/server-commands/#sv_enforcegamebuild-build) on your server - recommended to use 2802
3. Add a line like this to your startup file (server.cfg): `sv_enforceGameBuild 2802`

</details>

<details>

<summary>Selected options in tuning are not saved in the garage</summary>

Replace the functions responsible for saving and loading vehicle properties, you will find the prepared options in the section [Installation](/assets/vms_tuning/installation.md)

</details>

<details>

<summary>I'm getting the "vms_tuning:verifyPlateNotExist" error on ESX</summary>

It looks like you have an older ESX or a modified ESX and do not have the ESX.RegisterCommand function in your es\_extended

1. Open the config.lua vms\_tuning
2. Find `Config.AdminDiscountCodesCommand`
3. Change in command generate and remove from `oldESX =`` `<mark style="color:red;">`false`</mark> to `oldESX =`` `<mark style="color:green;">`true`</mark>

</details>

<details>

<summary><mark style="color:yellow;">[WARNING]</mark> Selected language <mark style="color:red;">"__"</mark> not found, changed to <mark style="color:green;">"EN"</mark>, configure your language in translation.json</summary>

You have selected a language that does not exist for the translation.json file, create your language in this file.

</details>

<details>

<summary>My progress-bar takes 2x longer</summary>

In that case, add your export progressbar to the thread

```lua
CL.ProgressBar = function(label, time)
    Citizen.CreateThread(function() -- Added
        exports['progressbar']:Progress({
            name = 'installation',
            label = label,
            duration = time,
            canCancel = false,
            controlDisables = {
                disableMouse = false,
                disableMovement = true,
                disableCarMovement = true,
                disableCombat = true,
            }
        })
    end) -- Added
end
```

</details>

<details>

<summary>I don't see tuning points</summary>

If you do not see a tuning point, it means that you have misconfigured the job or grade\_access, do it correctly.

If you are using ESX, go to your database - the **jobs** and **job\_grades** table, get the information about your job and the job\_grades that you want to have access to the tuning menu:<img src="/files/0syYfTgOAsgUovYKDrbp" alt="table: jobs" data-size="original">\
In the above screenshot, you can see the job whose name is mechanic, so in a specific tuning, it should be set `job = 'mechanic',`

<img src="/files/mlWqT8kv2V2ZMQ9LfxeJ" alt="table: job_grades" data-size="original">\
In the above screenshot, you can see several grades that fall under the mechanic job, so they should be included `grades_access = {'recrue', 'novice', 'experimente', 'chief', 'boss'},`

If you are using QB-Core, go to the file qb-core/shared/jobs.lua

![](/files/3UePyvO32LesbdDH9A3Y)\
In the above screenshot, you can see the mechanic job, as well as several grades, so they should be introduced `job = 'mechanic',` oraz `grades_access = {'Recruit', 'Novice', 'Experienced', 'Advanced', 'Manager'},`

</details>

<details>

<summary>I don't see all options in management menu</summary>

A process similar to that of [#i-dont-see-tuning-points](#i-dont-see-tuning-points "mention"), but you have to configure  `manager_grades` and `boss_grades`

</details>

<details>

<summary>When trying to open the management menu, I get a ban from qb-management</summary>

1. Go to your qb-management/server/sv\_boss.lua
2. Find these [marked lines](https://github.com/qbcore-framework/qb-management/blob/main/server/sv_boss.lua#L22-L25)

```lua
if not Player.PlayerData.job.isboss then
    ExploitBan(src, 'GetEmployees Exploiting')
    return
end
```

3. Remove them.

</details>

<details>

<summary>I cannot open management menu on qbx-core</summary>

This is normal, because qbx\_management does not have a callback by default to get a list of employees with the exact parameters we use from qb-management on qb-core.

To do this, you must register the prepared callback in your qbx\_management.

1. Go to **qbx\_management/server/main.lua**
2. Add this code in the file:

```lua
local QBCore = exports['qb-core']:GetCoreObject()
QBCore.Functions.CreateCallback('qbx_management:server:GetEmployeesForVMS', function(source, cb, jobname) 
    local employees = {}
    local players = MySQL.query.await("SELECT * FROM `players` WHERE `job` LIKE '%" .. jobname .. "%'", {})

    if players[1] ~= nil then
        for _, value in pairs(players) do
            local isOnline = QBCore.Functions.GetPlayerByCitizenId(value.citizenid)

            if isOnline and isOnline.PlayerData.job.name == jobname then
                employees[#employees + 1] = {
                    empSource = isOnline.PlayerData.citizenid,
                    grade = isOnline.PlayerData.job.grade,
                    isboss = isOnline.PlayerData.job.isboss,
                    name = '🟢 ' .. isOnline.PlayerData.charinfo.firstname .. ' ' .. isOnline.PlayerData.charinfo.lastname
                }
            elseif value.job.name == jobname then
                employees[#employees + 1] = {
                    empSource = value.citizenid,
                    grade = value.job.grade,
                    isboss = value.job.isboss,
                    name = '🔴 ' .. value.charinfo.firstname .. ' ' .. value.charinfo.lastname
                }
            end
        end
        table.sort(employees, function(a, b)
            return a.grade.level > b.grade.level
        end)
    end
    cb(employees)
end)
```

3. Save the file as well as close it
4. Go to **vms\_tuning/config/config.client.lua**
5. Find `CL.GetEmployees` function
6. Replace it with the one below:

```lua
CL.GetEmployees = function(cb, jobName)
    QBCore.Functions.TriggerCallback('qbx_management:server:GetEmployeesForVMS', function(employees)
        cb(employees)
    end, jobName)
end
```

7. Save the file as well as close it
8. Restart server

</details>

<details>

<summary>Problem with Wheel Size/Wheel Width/Suspension Height/Wheel Stance/Engine Swap</summary>

In GTA, custom options such as Wheel Size, Wheel Width, Custom Suspension Height, Wheel Stance, and Engine Swap — which Rockstar Games has not normally allowed players to install in Online sessions via the mechanic's workshop — are not synchronized in the same way as other options, such as vehicle color, etc.

This means that we had to create our own synchronization for these parts, which results in higher resmon usage. However, this has been limited to the smallest possible consumption by using the best optimization methods. For example, this resmon will only be active when the vehicle is visible on your screen. If there are no vehicles visible on your screen, the synchronization module will not be active.

For the options Wheel Size, Wheel Width, and Custom Suspension Height to load with the optimized method, **they must be created on the server side** and **must be assigned** [**StateBag's**](https://docs.fivem.net/docs/scripting-manual/networking/state-bags/) **with vehicle properties**. By default, in ESX, there is a server-side function `ESX.OneSync.SpawnVehicle`, which fulfills all the requirements - spawn on the server side and automatic setting of vehicle properties, but in the case of QB-Core, such a statebag is not assigned, so you need to enter it yourself in your garage system when the vehicle is created, example below

```lua
---@param veh number: Enitty ID
---@param vehProps table: Table with all vehicle props
Entity(veh).state:set("VehicleProperties", vehProps, true)
```

```lua
-- Example code for QB-Garages
QBCore.Functions.CreateCallback('qb-garages:server:spawnvehicle', function(source, cb, plate, vehicle, coords)
    local vehType = QBCore.Shared.Vehicles[vehicle] and QBCore.Shared.Vehicles[vehicle].type or GetVehicleTypeByModel(vehicle)
    local veh = CreateVehicleServerSetter(GetHashKey(vehicle), vehType, coords.x, coords.y, coords.z, coords.w)
    local netId = NetworkGetNetworkIdFromEntity(veh)
    SetVehicleNumberPlateText(veh, plate)
    local vehProps = {}
    local result = MySQL.rawExecute.await('SELECT mods FROM player_vehicles WHERE plate = ?', { plate })
    if result and result[1] then
        vehProps = json.decode(result[1].mods)
        Entity(veh).state:set("VehicleProperties", vehProps, true) -- ADDED
        exports['vms_tuning']:applyCustomMods(veh) -- ADDED
    end
    OutsideVehicles[plate] = { netID = netId, entity = veh }
    cb(netId, vehProps, plate)
end)
```

As for Wheel Stance and Engine Swap, this is managed by vms\_tuning, and it is responsible for assigning special StateBag's for the vehicle, which we can synchronize and set. However, this also requires the vehicle to be spawned on the server side.

Without meeting the above guidelines, the options will not work correctly or synchronize.

### **Need help integrating your garage system?**

Check out the dedicated [Garage Integration](/assets/vms_tuning/guides/garage-integration.md) section. It includes step-by-step guides for common garage systems (e.g., jg-advancedgarages) and solutions for known compatibility issues.

</details>

<details>

<summary>Why don't I see plates colors like e-Cole, Sprunk?</summary>

You need to use gamebuild at least 3095, if you have it, it may be due to the use of NVE (NaturalVision Evloved)

</details>


---

# 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_tuning/common-errors.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.
