Skip to content

Customization ​

Editable files ​

File or folderPurpose
config.luaServer options and the block the menu writes. See Configuration
web/theme.cssMenu colours and corner radius
sounds/Your own sound files
locales/*.jsonAll texts: notifications, command help, console messages
bridge/**Notifications and death detection per framework
client/main.luaClient hooks
server/main.luaServer hooks
shared/**Shared helpers and the settings schema

Keep copies of the files you change, so you can reapply them after an update. Hooks are described in Exports and Events.

web/theme.css holds the menu colours and the corner radius. Use hex (#rrggbb) or rgba() values only. Edit it and restart the resource.

Updates of the resource keep your copy of theme.css.

css
.dark {
  /* Primary (Save, active tab, switches on) */
  --primary: #e5e5e5;
  --primary-foreground: #171717;

  /* Cards, dialogs, toasts */
  --card: #171717;

  /* Corner radius (rem) */
  --radius: 0.625rem;
}
VariableUsed for
--foreground, --muted-foregroundText, secondary text
--card, --popoverCards, dialogs, toasts, dropdowns
--primarySave, active tab, switches that are on
--secondaryButtons, the On / Off / Auto switch, slider tracks
--muted, --accentHover and quiet backgrounds
--destructive, --success, --warning, --infoStates
--border, --input, --ringBorders, input borders, focus ring
--overlayBackdrop behind dialogs
--scrollbar-thumb, --scrollbar-thumb-hoverScrollbars
--radiusCorner radius, in rem

Custom sounds ​

  1. Put an .ogg or .mp3 file in sounds/. Not .wav. The name may only use letters, digits, _ and -.

  2. Add it to Config.CustomSounds:

    lua
    Config.CustomSounds = {
        { file = 'spirit_chime.ogg', label = 'Spirit chime' },
        { file = 'my_sound.ogg', label = 'My sound' },
    }
  3. Restart the resource. In the menu, Sound → Custom lists it.

Three sounds are included: spirit_chime.ogg, spirit_rise.ogg and spirit_release.ogg.

Each player's game plays custom sounds with the volume set in the menu, fading out with the distance up to the sound range. An entry with an invalid name is left out, and a listed file that is missing is reported in the server console.

Notifications ​

Config.Notify picks the notification system: 'default' (GTA feed), 'ox_lib', 'okokNotify', 'qb', 'esx' or 'custom'.

For 'custom', edit bridge/notify/custom/client.lua:

lua
-- ntype: 'inform' | 'success' | 'error' | 'warning'
function Bridge.Notify(message, ntype)
    TriggerEvent('chat:addMessage', { args = { L('notify.title'), message } })
end

Languages ​

Texts live in locales/en.json and locales/pt.json. To add a language:

  1. Copy locales/en.json to a new file, for example locales/es.json, and translate the values.
  2. Set Config.Locale = 'es'.

If the file is missing or isn't valid JSON, English is used and the console says so.