Script Multicharacter
Multicharacter configuration reference
Every config/shared.lua and config/server.lua setting of Multicharacter, with its default value and effect.
Settings live in config/shared.lua (read by the client, the server and the interface) and config/server.lua (server only). After a change, run restart mrpoulpi_multicharacter then reconnect.
General
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Locale | string | 'fr' | Language of the texts: interface, notifications, server console messages and Discord log titles. Shipped values: fr and en (files in locales/). A key missing from the chosen language is taken from en. |
Config.Debug | boolean | false | Prints in the F8 console, at startup, the selected framework and appearance system. Useful to check automatic detection; keep false in production. |
Dependencies
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Dependencies.Framework | string | 'auto' | Framework in use: auto, esx, qb, qbx or custom. In auto, the resource picks Qbox (qbx_core) first, then QBCore (qb-core without qbx_core), then ESX (es_extended). custom is never picked in auto. The framework is looked for during 15 seconds after startup. Without a match, the console shows “No compatible framework detected” and the selection does not open. |
Config.Dependencies.Appearance | string | 'auto' | Appearance system: auto, illenium-appearance, fivem-appearance, esx_skin, qb-clothing, custom or none. In auto: illenium-appearance, then fivem-appearance, then esx_skin (with skinchanger) or qb-clothing, otherwise none. An unknown name shows “Appearance bridge "…" not found” in F8 and the resource falls back to none (no appearance editor). |
See also Frameworks and appearance.
Slots
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Slots.Default | number | 1 | Number of slots unlocked for every player, before bonuses (ACE, database, identifiers). |
Config.Slots.Max | number | 4 | Number of cards shown and cap of unlocked slots: a player can never exceed this value, whatever their bonuses. Cards beyond their unlocked slots are shown as locked. If a player already owns a character on a higher slot (migration), the grid grows to show it. |
Config.Slots.ShowLocked | boolean | true | Shows locked slots (VIP badge, shop button). With false, only characters and free slots are visible. |
Config.Slots.LockExcessCharacters | boolean | false | Locks the characters placed on a slot higher than the player’s number of unlocked slots (for instance after a VIP subscription ends). A locked character stays visible but cannot be played. A locked character can still be deleted when Features.Delete = true. |
The full calculation is explained in Slots and shop.
Features
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Features.Delete | boolean | true | Lets players delete their characters (Delete button and Del key, with confirmation). Deletion is permanent. |
Config.Features.AppearanceEdit | boolean | true | Shows the Appearance button: the character is loaded, spawns at the chosen point, then the appearance editor opens. |
Config.Features.CreatorOnSpawn | boolean | true | Opens the appearance editor right after a new character spawns. With false, the character keeps the default freemode ped. |
Config.Features.ForceCreator | boolean | true | If the player closes or cancels the editor at creation, it is reopened up to CreatorRetries times. With false, a single attempt. After the last attempt, the player stays in game with the current appearance; F8 shows “character customization was not completed”. |
Config.Features.CreatorRetries | number | 3 | Total number of editor openings when ForceCreator = true. Bounds: 1 to 10 |
Config.Features.Relog | boolean | true | Enables the back-to-selection command. The Logout export stays available even with false. |
Config.Features.RelogCommand | string | 'relog' | Command name (without /). Available to every player, no ACE. An empty string disables the command. |
Identity
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Identity.NameMinLength | numbercharacters | 2 | Minimum length of first and last name, separators included. |
Config.Identity.NameMaxLength | numbercharacters | 16 | Maximum length of first and last name. Check it fits your framework columns (users.firstname on ESX). |
Config.Identity.AllowCompoundNames | boolean | true | Allows space, apostrophe and hyphen between two letters (Jean-Pierre, O’Neil, Da Silva). Never at the start or end, never two in a row. With false: letters only. |
Config.Identity.MinAge | numberyears | 18 | Minimum age, computed from the server date. |
Config.Identity.MaxAge | numberyears | 90 | Maximum age. |
Config.Identity.MinHeight | numbercm | 140 | Minimum height (form slider and server check). |
Config.Identity.MaxHeight | numbercm | 210 | Maximum height. |
Config.Identity.DefaultHeight | numbercm | 180 | Starting value of the slider, and height shown for a character without one (a QBCore character created before installation, for example). |
Config.Identity.DefaultBirthdate | string | '1995-01-01' | Date suggested in the form, always in YYYY-MM-DD format whatever UI.DateFormat is. |
Config.Identity.DefaultNationality | string | 'Américaine' | Nationality selected by default, and nationality shown for a character without one. Must be in Nationalities, otherwise the form uses the first of the list. |
Config.Identity.Nationalities | string[] | 27 entries | List offered to the player. The server rejects any value that is not in it exactly (case and accents included). |
Config.Identity.Blacklist | string[] | 7 words | Words forbidden in first and last name. The comparison ignores case and looks for the word inside the name: “staff” also rejects “Stafford”. |
First and last names accept Latin letters with accents. The first letter of each part is capitalised and the rest lowered: jean-pierre becomes Jean-Pierre.
Spawn
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Spawn.AllowLastPosition | boolean | true | Offers “Last position” as the first choice. Greyed out when the framework has no saved position for that character. |
Config.Spawn.Default | vector4 | vector4(-269.41, -955.31, 31.22, 205.0) | Fallback point when the received choice matches no point and no last position is available. |
Config.Spawn.NewCharacter | vector4 | vector4(-1037.74, -2737.79, 20.17, 329.4) | Spawn point of every new character (LSIA airport by default). The player does not choose at creation. |
Config.Spawn.Locations | table[] | 2 points | Points offered to an existing character. Fields: id (unique), label, description, icon, coords (vector4). Details are in Customisation. |
Scene
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Scene.Coords | vector4 | vector4(-75.21, -819.11, 326.17, 158.0) | Position and heading of the ped during selection (Maze Bank roof by default). The ped is frozen and invincible there. |
Config.Scene.Weather | string | 'EXTRASUNNY' | Local weather forced during selection. |
Config.Scene.Hour | number | 12 | Local hour forced during selection. Bounds: 0 to 23 |
Config.Scene.Minute | number | 40 | Local minute forced during selection. Bounds: 0 to 59 |
Config.Scene.CameraDistance | numbermetres | 3.4 | Distance between the camera and the ped, in front of it. |
Config.Scene.CameraHeight | numbermetres | 0.45 | Camera height relative to the ped’s centre. |
Config.Scene.TargetHeight | numbermetres | 0.25 | Height of the point the camera looks at. |
Config.Scene.CameraShift | numbermetres | 0.8 | Side offset of the aimed point: the ped appears on one side of the screen to leave room for the information panel. |
Config.Scene.CameraFov | numberdegrees | 38.0 | Camera field of view: smaller = more zoomed in. |
Config.Scene.SwayAmount | numbermetres | 0.35 | Amplitude of the camera side sway when the player enabled “Cinematic camera”. 0 = fixed camera. |
Config.Scene.SwaySpeed | number | 0.00025 | Sway speed, in cycles per millisecond: 0.00025 makes one back-and-forth every 4 seconds. |
Config.Scene.Timecycle | string | 'cinema' | Image filter (timecycle modifier) applied when the player enabled “Visual effects”, with depth of field. An empty string disables the filter. |
Config.Scene.TimecycleStrength | number | 0.45 | Filter strength. Bounds: 0 to 1 |
Config.Scene.PedScenario | string | '' | Scenario played by the displayed ped (e.g. WORLD_HUMAN_SMOKING). Empty = neutral pose. |
To change the backdrop, see Customisation.
Interface
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.UI.Watermark | string | 'MrPoulpi Labs' | Text shown bottom right. Put your server name, or an empty string. |
Config.UI.DateFormat | string | 'DD/MM/YYYY' | Display and input format of dates, made of DD, MM and YYYY (e.g. MM/DD/YYYY). Unrelated to the format stored in the database. The field example text (placeholder_birthdate, “DD/MM/YYYY”) is in locales/: adapt it if you change the format. |
Config.UI.Currency | string | '$' | Symbol of the Cash and Bank amounts. |
Config.UI.CurrencyBefore | boolean | true | true: $12 500. false: 12 500 $. |
Config.UI.SceneOpacity | number | 0.55 | Opacity of the background over the 3D scene when the cinematic camera is on: 0 = scene fully visible, 1 = opaque background. Without the cinematic camera, the background is opaque. Bounds: 0 to 1 |
Config.UI.AllowCustomBackground | boolean | true | Lets each player paste a background image URL (https only) in Settings. The image is loaded from the player’s connection. |
Config.UI.MusicUrl | string | '' | Direct URL of an audio file (.mp3, .ogg…) looped during selection. Empty = “Ambient music” option and volume setting hidden. A YouTube page does not work. |
Config.UI.Defaults.Background | string | 'violet' | id of the background preset used by default (an entry of UI.Backgrounds). |
Config.UI.Defaults.Music | boolean | false | Music on by default (when MusicUrl is set). |
Config.UI.Defaults.Cinematic | boolean | true | Cinematic camera on by default: 3D scene visible and sway. |
Config.UI.Defaults.Effects | boolean | true | Visual effects on by default: Scene.Timecycle filter and depth blur. |
Config.UI.Defaults.Volume | number | 70 | Default music volume. Bounds: 0 to 100 |
Config.UI.Backgrounds | table[] | 4 presets | Backgrounds offered in Settings: { id, value }. value is a CSS gradient or an http(s) or nui:// image URL. |
Links
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Links.Discord | string | '' | Discord invite opened by the toolbar button, in the player’s browser. Empty = button hidden. |
Shop
| Setting | Type | Default | Effect |
|---|---|---|---|
Config.Shop.Enabled | boolean | true | Shows the “Visit store” button on locked slots and in the window they open. |
Config.Shop.Url | string | 'https://votre-boutique.tebex.io' | Your store address, used when the chosen offer has no valid url. Must be replaced: the demonstration address and any non-https address are blocked and show “Store not configured”. |
Config.Shop.Packages | table[] | 1 offer | Offers shown in a locked slot window: id, title, description, icon, url, and optionally slot = 2 or slots = { 2, 3 }. See Slots and shop. |
Routing buckets
| Setting | Type | Default | Effect |
|---|---|---|---|
ServerConfig.RoutingBuckets | boolean | true | Isolates each player in their own routing bucket during selection: other players do not see their ped on the scene. They are put back in bucket 0 once in game. |
ServerConfig.BucketOffset | number | 50000 | Bucket used = BucketOffset + player server ID. Pick a range your other resources (instances, apartments) do not use. |
Server-side slots
| Setting | Type | Default | Effect |
|---|---|---|---|
ServerConfig.Slots.Command | string | 'multichar_slots' | Name of the console command that manages bonus slots. It only works from the server console (or txAdmin, RCON, Tebex): typed in game, it does nothing. |
ServerConfig.Slots.Aces | table | { ['multicharacter.slots.vip'] = 2 } | Slots added per ACE permission: [ace] = amount. Bonuses of several ACEs add up. |
ServerConfig.Slots.Identifiers | table | { ['license:000…000'] = 4 } | Guaranteed minimum total per identifier (license:, discord:, fivem:, steam:…): [identifier] = total. This is not a bonus: the player gets at least this total. The shipped entry is an inactive example. |
ESX
| Setting | Type | Default | Effect |
|---|---|---|---|
ServerConfig.ESX.Prefix | string | 'char' | Prefix of ESX character identifiers: char1:<licence>, char2:<licence>… Same default as esx_multicharacter: existing characters are picked up as they are. Do not change it on a server that already has characters: they would no longer show up. |
ServerConfig.ESX.DateFormat | string | 'DD/MM/YYYY' | Format of the users.dateofbirth column, for reading and writing. Must match what your database already holds (esx_identity uses DD/MM/YYYY). |
ServerConfig.ESX.DeleteTables | table[] | 9 tables | Tables cleaned when a character is deleted: { table, column }, where column holds the character identifier. Tables or columns missing from your database are skipped at startup. users is always deleted last, in a single transaction. |
ServerConfig.ESX.DeleteTables = {
{ table = 'users', column = 'identifier' },
{ table = 'owned_vehicles', column = 'owner' },
{ table = 'phone_phones', column = 'owner_id' },
}
A table or column that does not exist in your database is simply skipped.
QBCore
| Setting | Type | Default | Effect |
|---|---|---|---|
ServerConfig.QB.StarterItems | boolean | true | Gives at creation the items of QBCore.Shared.StarterItems (qb-core/shared/main.lua). id_card and driver_license receive the character information. |
Qbox
| Setting | Type | Default | Effect |
|---|---|---|---|
ServerConfig.QBX.StarterItems | table[] | { { name = 'phone', amount = 1 } } | Items given at creation on Qbox, through ox_inventory: { name, amount, metadata }. Nothing is given if ox_inventory is not started. Empty list = no item. |
ServerConfig.QBX.StarterItems = {
{ name = 'phone', amount = 1 },
{ name = 'water', amount = 2 },
}
Items must exist in ox_inventory/data/items.lua.
Discord logs
| Setting | Type | Default | Effect |
|---|---|---|---|
ServerConfig.Logs.Webhook | string | '' | Discord webhook receiving character creations, loads and deletions. Empty = no log. This file is only read by the server. |
ServerConfig.Logs.Name | string | 'MrPoulpi Labs · Multicharacter' | Name shown as the author of the Discord messages. |