Customisation
Adapt Multicharacter to your server: spawn points, icons, backdrop and camera, backgrounds and music, texts, weather sync and Discord logs.
Spawn points
Each Config.Spawn.Locations entry becomes a choice in the panel, under “Last position”:
Config.Spawn.Locations = {
{
id = 'apartment',
label = 'Apartment',
description = 'Alta Street',
icon = 'building-2',
coords = vector4(-269.41, -955.31, 31.22, 205.0)
},
{
id = 'sandy',
label = 'Sandy Shores',
description = 'Motel',
icon = 'hotel',
coords = vector4(1142.33, 2664.11, 38.16, 90.0)
}
}
coords holds the position and heading. id must be unique, last is reserved for the last position. New characters always spawn on Config.Spawn.NewCharacter.
Icons
For spawn points and store offers, use one of these names:
house, hotel, building-2, plane-takeoff, map-pin, landmark, crown, sparkles, shopping-cart, banknote, user, user-plus, lock, flag, calendar, clock, history, ruler, music, video, image, message-circle, volume-2, play, pencil, settings, check.
A misspelt name shows an exclamation mark.
Backdrop and camera
During selection, the character is placed on Config.Scene.Coords (the Maze Bank roof by default). To change the backdrop:
- Stand at the spot you want, facing where the camera should be.
- Copy your position and heading into
Config.Scene.Coords. - Adjust
CameraDistance,CameraHeight,CameraShiftandCameraFov. - Pick the weather and time with
Weather,HourandMinute.
Background, music and server name
The backgrounds offered in Settings are in Config.UI.Backgrounds. A background is a CSS gradient or an image:
Config.UI.Backgrounds = {
{ id = 'violet', value = 'radial-gradient(120% 90% at 50% 0%, #4a3868 0%, #2b2139 45%, #141317 100%)' },
{ id = 'city', value = 'https://cdn.my-server.com/backgrounds/city.jpg' }
}
Config.UI.Defaults.Background = 'city'
Config.UI.SceneOpacitysets how see-through the background is over the 3D scene.Config.UI.MusicUrlmust point to an audio file (.mp3,.ogg), not a YouTube page.Config.UI.Watermarkshows your server name bottom right,Config.Links.Discordadds a Discord button.
Players change these settings in Settings. Their choices are saved on their PC.
Texts
Every text is in locales/fr.lua and locales/en.lua. Change the value on the right and keep the %s:
title = 'Choose your citizen',
new_character_hint = 'Start a new life in Los Santos',
For another language, copy locales/en.lua to locales/de.lua, replace Locales.en with Locales.de, translate, then set Config.Locale = 'de'.
Weather and HUD during selection
config/client.lua holds hooks called when the selection opens and closes. By default, they pause qb-weathersync and cd_easytime so the scene weather is not replaced:
function ClientHooks.OnSelectionOpen()
TriggerEvent('qb-weathersync:client:DisableSync')
TriggerEvent('cd_easytime:PauseSync', true)
end
function ClientHooks.OnSelectionClose()
TriggerEvent('qb-weathersync:client:EnableSync')
TriggerEvent('cd_easytime:PauseSync', false)
end
With another weather script, replace these lines with its own events. You can also hide your HUD there. Test your changes: an error in these functions blocks the selection.
Discord logs
ServerConfig.Logs = {
Webhook = 'https://discord.com/api/webhooks/…',
Name = 'My server · Characters'
}
A message is sent on every character creation, load and deletion, with the player, their licence and the character.