# Configuration Files

## 1. Configuration config.lua

{% tabs %}
{% tab title="ESX Legacy" %}
If you want players to be able to delete their character, set **true**, if you want them to see a notify about going to the administration for delete a character, set **false**

```lua
Config.CanDelete = true -- true / false
```

Configure the weather system so that the character preview has the weather you want

```lua
Config.WeatherSync = "vSync" -- "cd_easytime", "vSync"
Config.Weather = 'EXTRASUNNY' -- weather type
```

If you use a custom character creator for e.g. *vms\_charcreator*, set this option to **true**, if you want to use the default one from esx\_skin, fivem-appearance or illenium-appearance, set it to **false**

```lua
Config.UseCustomSkinCreator = false -- if you use esx_skin / fivem-appearance for character creator set it to false, if you use custom character creator set it to true and change in @vms_multichars/config/config_client.lua function openCharacterCreator(skin)
```

This moves the player into their own virtual world which also removes any collisions between players

```lua
Config.UseRoutingBuckets = true
```

By default the coordinates are set on top of Diamond Casino, if you don't have a server started with build that extended of Diamond Casino DLC, you won't be able to select a character, you need to change coordinates or add a set new [server build](https://docs.fivem.net/docs/server-manual/server-commands/#sv_enforcegamebuild-build)

```lua
Config.ToLeft = vector3(919.61, -295.44, 64.73) -- This coords is on the Diamond Casino, if you didnt have build with this, its not works, you need to change the coords
Config.Spawn = vector4(917.4, -293.36, 64.63, 280.76) -- This coords is on the Diamond Casino, if you didnt have build with this, its not works, you need to change the coords
Config.FromRight = vector3(917.7, -291.62, 64.63) -- This coords is on the Diamond Casino, if you didnt have build with this, its not works, you need to change the coords
```

If you have changed the player's position you can also change the camera height to match the new coordinates

```lua
Config.CameraHeightPoint = 1.5 -- + 1.5
Config.CameraHeight = 0.5
Config.CameraForward = 1.0
```

You can change the coordinates where the player will spawn after creating a new character but if you are using a custom character creator, you need to change the respawn coordinates in the char creator script

```lua
Config.SpawnLocation = vec(1071.86, -711.57, 873.45) -- here you can set the coordinates in which the player will spawn after creating a character ! IMPORTANT, if you use Config.UseCustomSkinCreator, it won't work, you need to set in charcreator e.g. vms_charcreator !
```

Here you set whether players will be able to change characters during the game on the coordinates you set, if you don't want it set `enable = false`

```lua
Config.ChangeCharacterPoint = {
	enable = true,
	coords = vector3(-1045.07, -2750.11, 21.36),
	marker = {
		id = 2, 
		rgba = {255, 215, 25, 100}, 
		size = vec(0.75, 0.75, 0.75), 
		rotate = true
	},
	blip = {
		sprite = 480, 
		color = 2, 
		scale = 1.0, 
		name = "Character Selector"
	},
}
```

{% endtab %}

{% tab title="QB-Core" %}
If you want players to be able to delete their character, set **true**, if you want them to see a notify about going to the administration for delete a character, set **false**

```lua
Config.CanDelete = true -- true / false
```

Configure the weather system so that the character preview has the weather you want

```lua
Config.WeatherSync = "vSync" -- "cd_easytime", "vSync"
Config.Weather = 'EXTRASUNNY' -- weather type
```

You need to adjust the skinmanager for your server the one you are using

```lua
Config.SkinManager = "qb-clothing" -- "qb-clothing" / "fivem-appearance" / "illenium-appearance"
```

If you use a custom character creator for e.g. *vms\_charcreator*, set this option to **true**, if you want to use the default one from qb-clothing, fivem-appearance or illenium-appearance, set it to **false**

```lua
Config.UseCustomSkinCreator = false -- if you use esx_skin / fivem-appearance for
```

This moves the player into their own virtual world which also removes any collisions between players

```lua
Config.UseRoutingBuckets = true
```

By default the coordinates are set on top of Diamond Casino, if you don't have a server started with build that extended of Diamond Casino DLC, you won't be able to select a character, you need to change coordinates or add a set new [server build](https://docs.fivem.net/docs/server-manual/server-commands/#sv_enforcegamebuild-build)

```lua
Config.ToLeft = vector3(919.61, -295.44, 64.73) -- This coords is on the Diamond Casino, if you didnt have build with this, its not works, you need to change the coords
Config.Spawn = vector4(917.4, -293.36, 64.63, 280.76) -- This coords is on the Diamond Casino, if you didnt have build with this, its not works, you need to change the coords
Config.FromRight = vector3(917.7, -291.62, 64.63) -- This coords is on the Diamond Casino, if you didnt have build with this, its not works, you need to change the coords
```

If you have changed the player's position you can also change the camera height to match the new coordinates

```lua
Config.CameraHeightPoint = 1.5 -- + 1.5
Config.CameraHeight = 0.5
Config.CameraForward = 1.0
```

You can change the coordinates where the player will spawn after creating a new character but if you are using a custom character creator, you need to change the respawn coordinates in the char creator script

```lua
Config.SpawnLocation = vec(1071.86, -711.57, 873.45) -- here you can set the coordinates in which the player will spawn after creating a character ! IMPORTANT, if you use Config.UseCustomSkinCreator, it won't work, you need to set in charcreator e.g. vms_charcreator !
```

Here you set whether players will be able to change characters during the game on the coordinates you set, if you don't want it set `enable = false`

```lua
Config.ChangeCharacterPoint = {
	enable = true,
	coords = vector3(-1045.07, -2750.11, 21.36),
	marker = {
		id = 2, 
		rgba = {255, 215, 25, 100}, 
		size = vec(0.75, 0.75, 0.75), 
		rotate = true
	},
	blip = {
		sprite = 480, 
		color = 2, 
		scale = 1.0, 
		name = "Character Selector"
	},
}
```

{% endtab %}

{% tab title="QBOX" %}
If you want players to be able to delete their character, set **true**, if you want them to see a notify about going to the administration for delete a character, set **false**

```lua
Config.CanDelete = true -- true / false
```

Configure the weather system so that the character preview has the weather you want

```lua
Config.WeatherSync = "qb-weathersync" -- "cd_easytime", "qb-weathersync"
Config.Weather = 'EXTRASUNNY' -- weather type
```

You need to adjust the skinmanager for your server the one you are using

```lua
Config.SkinManager = "illenium-appearance" -- "fivem-appearance" / "illenium-appearance"
```

If you use a custom character creator for e.g. *vms\_charcreator*, set this option to **true**, if you want to use the default one from fivem-appearance or illenium-appearance, set it to **false**

```lua
Config.UseCustomSkinCreator = false -- if you use esx_skin / fivem-appearance for
```

This moves the player into their own virtual world which also removes any collisions between players

```lua
Config.UseRoutingBuckets = true
```

By default the coordinates are set on top of Diamond Casino, if you don't have a server started with build that extended of Diamond Casino DLC, you won't be able to select a character, you need to change coordinates or add a set new [server build](https://docs.fivem.net/docs/server-manual/server-commands/#sv_enforcegamebuild-build)

```lua
Config.ToLeft = vector3(919.61, -295.44, 64.73) -- This coords is on the Diamond Casino, if you didnt have build with this, its not works, you need to change the coords
Config.Spawn = vector4(917.4, -293.36, 64.63, 280.76) -- This coords is on the Diamond Casino, if you didnt have build with this, its not works, you need to change the coords
Config.FromRight = vector3(917.7, -291.62, 64.63) -- This coords is on the Diamond Casino, if you didnt have build with this, its not works, you need to change the coords
```

If you have changed the player's position you can also change the camera height to match the new coordinates

```lua
Config.CameraHeightPoint = 1.5 -- + 1.5
Config.CameraHeight = 0.5
Config.CameraForward = 1.0
```

You can change the coordinates where the player will spawn after creating a new character but if you are using a custom character creator, you need to change the respawn coordinates in the char creator script

```lua
Config.SpawnLocation = vec(1071.86, -711.57, 873.45) -- here you can set the coordinates in which the player will spawn after creating a character ! IMPORTANT, if you use Config.UseCustomSkinCreator, it won't work, you need to set in charcreator e.g. vms_charcreator !
```

Here you set whether players will be able to change characters during the game on the coordinates you set, if you don't want it set `enable = false`

```lua
Config.ChangeCharacterPoint = {
	enable = true,
	coords = vector3(-1045.07, -2750.11, 21.36),
	marker = {
		id = 2, 
		rgba = {255, 215, 25, 100}, 
		size = vec(0.75, 0.75, 0.75), 
		rotate = true
	},
	blip = {
		sprite = 480, 
		color = 2, 
		scale = 1.0, 
		name = "Character Selector"
	},
}
```

{% endtab %}
{% endtabs %}

## 2. Configuration config\_client.lua

{% tabs %}
{% tab title="ESX Legacy" %}
If you use a custom character creator than vms\_charcreator here you can add a trigger/export to open it

```lua
openCharacterCreator = function(skin, gender)
    TriggerEvent('skinchanger:loadSkin', skin, function()
        ResetEntityAlpha(PlayerPedId())
        SetPedAoBlobRendering(PlayerPedId(), true)
        if not Config.UseCustomSkinCreator then
            TriggerEvent('esx_skin:openSaveableMenu', function()
                finished = true 
            end, function() 
                finished = true
            end)
        else
            TriggerEvent('vms_charcreator:openCreator', gender)
        end
    end)
end
```

If you are using a different identity than vms\_identity you can change the trigger to open it here

```lua
openIdentity = function()
    TriggerEvent('vms_identity:showRegisterIdentity')
end
```

If you are using vms\_spawnselector or other spawnselector, you can enter your event here

```lua
openSpawnSelector = function()
    TriggerEvent('vms_spawnselector:open')
end
```

{% endtab %}

{% tab title="QB-Core" %}
If you use a custom character creator than vms\_charcreator here you can add a trigger/export to open it

```lua
openCharacterCreator = function(gender)
    TriggerEvent('qb-clothing:client:loadPlayerClothing', Config.Default, PlayerPedId())
    ResetEntityAlpha(PlayerPedId())
    SetPedAoBlobRendering(PlayerPedId(), true)
    if not Config.UseCustomSkinCreator then
        TriggerEvent('qb-clothes:client:CreateFirstCharacter')
    else
        TriggerEvent('vms_charcreator:openCreator', gender)
    end
end
```

If you are using a different identity than vms\_identity you can change the trigger to open it here

```lua
openIdentity = function()
    TriggerEvent('vms_identity:showRegisterIdentity')
end
```

{% endtab %}

{% tab title="QBOX" %}
If you use a custom character creator than vms\_charcreator here you can add a trigger/export to open it

```lua
openCharacterCreator = function(gender)
    TriggerEvent('qb-clothing:client:loadPlayerClothing', Config.Default, PlayerPedId())
    ResetEntityAlpha(PlayerPedId())
    SetPedAoBlobRendering(PlayerPedId(), true)
    if not Config.UseCustomSkinCreator then
        TriggerEvent('qb-clothes:client:CreateFirstCharacter')
    else
        TriggerEvent('vms_charcreator:openCreator', gender)
    end
end
```

If you are using a different identity than vms\_identity you can change the trigger to open it here

```lua
openIdentity = function()
    TriggerEvent('vms_identity:showRegisterIdentity')
end
```

{% endtab %}
{% endtabs %}

## 3. Open config\_server.lua

{% tabs %}
{% tab title="ESX Legacy" %}
You can set the default count of slots a player has. Remember that the administrator can also assign a custom number of slots to a player on the identifier with the command

```lua
Config.Slots = 5
```

If you have a non-standard database, and more specifically a users table with an identifier column you need change this

```lua
Config.UsersDatabase = {users = 'identifier'} -- {table = column}
```

You can change the prefix that will be saved in the database by default it is char

```lua
Config.Prefix = 'char'
```

Check what player identifier you use in your server, if you use steam hex set **"steam"**, if you use identifier as R\* license set **"license"**

```lua
Config.Identifier = "license" -- this is the identifier you use in the users table, if you use R* license set "license", if steam set "steam"
```

\
Using the options below, you can set the starting items and money for the player

```lua
Config.EnableStarterItems = false
Config.StarterItems = {
    {name = 'bread', count = 15},
    {name = 'water', count = 15},
}

Config.EnableStarterMoney = false
Config.StarterMoney = {
    {account = 'cash', amount = 1000},
    {account = 'bank', amount = 5000},
}
```

{% endtab %}

{% tab title="QB-Core" %}
You can set the default count of slots a player has. Remember that the administrator can also assign a custom number of slots to a player on the identifier with the command

```lua
Config.Slots = 5
```

Using the options below, you can set the starting items and money for the player

```lua
Config.EnableStarterItems = false
Config.StarterItems = {
    {name = 'bread', count = 15},
    {name = 'water', count = 15},
}

Config.EnableStarterMoney = false
Config.StarterMoney = {
    {account = 'cash', amount = 1000},
    {account = 'bank', amount = 5000},
}
```

\
If you are using vms\_spawnselector or other spawnselector than the default qb-spawn, you can enter your event here

```lua
openSpawnSelector = function(src, cData)
    if Config.UseCustomSpawnSelector then
        TriggerClientEvent('vms_spawnselector:open', src)
    else
        TriggerClientEvent('apartments:client:setupSpawnUI', src, cData)
    end
end
```

{% endtab %}

{% tab title="QBOX" %}
You can set the default count of slots a player has. Remember that the administrator can also assign a custom number of slots to a player on the identifier with the command

```lua
Config.Slots = 5
```

Using the options below, you can set the starting items and money for the player

```lua
Config.EnableStarterItems = false
Config.StarterItems = {
    {name = 'bread', count = 15},
    {name = 'water', count = 15},
}

Config.EnableStarterMoney = false
Config.StarterMoney = {
    {account = 'cash', amount = 1000},
    {account = 'bank', amount = 5000},
}
```

\
If you are using vms\_spawnselector or other spawnselector than the default qb-spawn, you can enter your event here

```lua
openSpawnSelector = function(src, cData)
    if Config.UseCustomSpawnSelector then
        TriggerClientEvent('vms_spawnselector:open', src)
    else
        TriggerClientEvent('apartments:client:setupSpawnUI', src, cData)
    end
end
```

{% endtab %}
{% endtabs %}

## 4. Open config\_commands.lua

{% tabs %}
{% tab title="ESX Legacy" %}
Adjust the command to delete characters, add missing tables from which data assigned to the player ID is to be removed

```lua
ESX.RegisterCommand('deletecharacter', 'admin', function(xPlayer, args, showError)
    MySQL.update("DELETE FROM `users` WHERE identifier = ?", {args.identifier})
    MySQL.update("DELETE FROM `owned_vehicles` WHERE owner = ?", {args.identifier})
    MySQL.update("DELETE FROM `user_licenses` WHERE owner = ?", {args.identifier})
    MySQL.update("DELETE FROM `datastore_data` WHERE owner = ?", {args.identifier})
    -- Here you can add more tables that you want it to delete when deleting a character.
    
    xPlayer.triggerEvent('vms_multichars:notification', (Config.Translate['cmd.success_deleted_character']):format(args.identifier), 5500, 'success')
end, true, {help = Config.Translate['cmd.help_deletecharacter'], validate = true, arguments = {
	{name = 'identifier', help = Config.Translate['cmd.help_identifier'], type = 'string'},
}})
```

{% endtab %}

{% tab title="QB-Core" %}
**Nothing to change...**
{% endtab %}

{% tab title="QBOX" %}
**Nothing to change...**
{% 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_multichars/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.
