Customization
Editable files
| File or folder | Purpose |
|---|---|
config.lua | Server options and the block the menu writes. See Configuration |
web/theme.css | Menu colours and corner radius |
sounds/ | Your own sound files |
locales/*.json | All texts: notifications, command help, console messages |
bridge/** | Notifications and death detection per framework |
client/main.lua | Client hooks |
server/main.lua | Server 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.
Menu colours
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;
}| Variable | Used for |
|---|---|
--foreground, --muted-foreground | Text, secondary text |
--card, --popover | Cards, dialogs, toasts, dropdowns |
--primary | Save, active tab, switches that are on |
--secondary | Buttons, the On / Off / Auto switch, slider tracks |
--muted, --accent | Hover and quiet backgrounds |
--destructive, --success, --warning, --info | States |
--border, --input, --ring | Borders, input borders, focus ring |
--overlay | Backdrop behind dialogs |
--scrollbar-thumb, --scrollbar-thumb-hover | Scrollbars |
--radius | Corner radius, in rem |
Custom sounds
Put an
.oggor.mp3file insounds/. Not.wav. The name may only use letters, digits,_and-.Add it to
Config.CustomSounds:luaConfig.CustomSounds = { { file = 'spirit_chime.ogg', label = 'Spirit chime' }, { file = 'my_sound.ogg', label = 'My sound' }, }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 } })
endLanguages
Texts live in locales/en.json and locales/pt.json. To add a language:
- Copy
locales/en.jsonto a new file, for examplelocales/es.json, and translate the values. - Set
Config.Locale = 'es'.
If the file is missing or isn't valid JSON, English is used and the console says so.
