Configuration
Every setting in the three open config files. Restart the resource after a change.
config.lua
The settings most servers change. For many servers this is all you need.
| Setting | Default | What it does |
|---|---|---|
Config.framework | 'auto' | auto, qbx, qb or esx. |
Config.locale | 'en' | en or sv. Copy locales/en.lua to add a language. |
Config.serverName | 'YOUR SERVER' | Shown top left in character selection. |
Config.maxSlots | 5 | Character slots shown, 1 to 5. On Qbox the real limit per player is in qbx_core/config/server.lua. |
Config.allowDelete | true | Players can delete their own characters. |
Config.transition | 'dive' | dive, switch or fade. |
Config.firstSpawn | 'lsia' | Spot id where new characters start. |
Config.lastLocation | true | Offer "Last location" to returning characters. |
Config.units | 'imperial' | Distances in the spawn menu: imperial or metric. |
Config.charSelectCommand | see Commands | Name of the command, on or off, admin only. |
Config.spawnCommand | see Commands | Name of the command, on or off, admin only, cooldown, allowed in vehicles. |
config_spawns.lua
The spawn spots and the groups in the list. See Spawn spots.
config_advanced.lua
You rarely need to touch these, the defaults work fine.
| Setting | What it does |
|---|---|
Config.hideHud | Hides your HUD while the menus are open. |
Config.notify | Sends notifications to your own system. Uses ox_lib by default. |
Config.onArrive | The text shown after you arrive. |
Config.appearance | Which appearance menu to use. See Appearance menu. |
Config.deleteHoldMs | How long the delete button has to be held. Default 2000 ms. |
Config.rules | Name length, age range, backstory length, nationalities and blocked words. |
Config.scene | Where the lineup stands, spacing, camera distances, studio lights, optional forced time and weather. |
Config.idles | Idle poses for the lineup. |
Config.sounds | Menu sounds. |
Config.nationalities | The list on QBCore and ESX. Qbox uses its own qbx_core/data/nationalities.lua. |
Config.starterLooks | The starting look of a new character before the appearance menu opens. |
Config.dive | Timing, end position, sweep limit, landing effect and sounds of the dive. |
Config.camera | Drone height, distance, orbit speed and clearance above roofs. |
Config.map | The map image and the world area it covers. Only change this if you swap the image. |
Identity rules
| Rule | Default | What it does |
|---|---|---|
nameMin, nameMax | 2, 16 | Name length. |
minAge, maxAge | 18, 90 | Age in years, from today's real date. |
backstory | 500 | Max characters. 0 hides the field. |
limitNationalities | true | Only allow nationalities from the list. |
defaultNationality | 'American' | Selected from the start. |
blocked | a short list | Lower case. Names that contain one of these words are refused. |
Your own HUD and notifications
lua
-- Your HUD: hidden while character selection, creation and the spawn menu are open
Config.hideHud = function(hidden)
TriggerEvent('my_hud:toggle', not hidden)
end
-- Notifications. kind: 'success' | 'error' | 'inform'
Config.notify = function(text, kind)
lib.notify({ description = text, type = kind or 'inform' })
end
-- Shown after you arrive. Make it an empty function to show nothing.
Config.onArrive = function(placeName)
-- your own arrival text
endMoving the lineup
Set Config.scene.origin to the centre of the line and the direction the characters face. Any flat spot works, since every ped is snapped to the ground under it.
Languages
English and Swedish are included. Copy locales/en.lua, translate it and set Config.locale to the name of your file.