Configuration
wasabi_pausemenu v2 is configured through shared config, client action config, and JSON locale files.
config/shared/config.luaβ
Config = {}
Config.Debug = false
Config.CheckForUpdates = true
Config.Language = 'en'
Config.CurrencySymbol = '$'
Config.CurrencySymbolPosition = 'left'
Config.UIColor = '#29b181'
Config.MenuOptions = {
{
icon = 'play',
label = 'RESUME GAME',
action = 'RESUME',
color = nil
},
{
icon = 'map',
label = 'WORLD MAP',
action = 'WORLD_MAP',
color = nil
},
{
icon = 'settings',
label = 'SETTINGS',
action = 'SETTINGS',
color = nil
},
{
icon = 'plug',
label = 'DISCONNECT',
action = 'DISCONNECT',
color = '#ff585b'
},
{
icon = 'x',
label = 'QUIT GAME',
action = 'QUIT_GAME',
color = '#ff585b'
}
}
Config.SocialLinks = {
{
icon = 'discord',
title = 'DISCORD',
description = 'Join Our Discord',
link = 'https://discord.gg/wasabiscripts',
color = '#5865F2'
},
{
icon = 'youtube',
title = 'YOUTUBE',
description = 'Subscribe to Our YouTube',
link = 'https://youtube.com/@wasabiscripts',
color = '#FF3838'
},
{
icon = 'tebex',
title = 'TEBEX',
description = 'Visit Our Tebex Store',
link = 'https://wasabiscripts.com',
color = '#41C4C3'
}
}
Shared config optionsβ
| Option | Type | Description |
|---|---|---|
Config.Debug | boolean | Enables verbose debug logging through lib.print.debug. When enabled, the server debug module raises this resource's ox_lib print level to debug. |
Config.CheckForUpdates | boolean | Enables the built-in update check on resource start. |
Config.Language | string | Locale code loaded from locales/*.json. The loader supports legacy cn, tw, and jp aliases for zh-cn, zh-tw, and ja. |
Config.CurrencySymbol | string | Currency symbol displayed for cash and bank values. |
Config.CurrencySymbolPosition | string | left or right, controlling whether the currency symbol appears before or after the value. |
Config.UIColor | string | UI accent color used for highlights, player name, and category cards. |
Config.MenuOptions | table | Main option buttons displayed in the pause menu. |
Config.SocialLinks | table | Footer social/link cards. Maximum of three is recommended by the config comments. |
Menu optionsβ
Each entry in Config.MenuOptions supports:
| Field | Description |
|---|---|
icon | Built-in icon name or a custom image URL. Built-in options include play, map, settings, plug, x, door, power, home, user, heart, star, bell, camera, car, plane, and phone. |
label | Text displayed on the option. |
action | Action identifier. Must match an entry in MenuActions or an action registered with RegisterMenuAction. |
color | Optional hex color for the icon/text. Uses default styling when nil. |
Social linksβ
Each entry in Config.SocialLinks supports:
| Field | Description |
|---|---|
icon | Built-in icon (discord, youtube, tebex) or custom image URL. |
title | Main title text. |
description | Subtitle/description text. |
link | URL opened when the user selects the social link. |
color | Accent color for the icon/background. |
config/client/config.luaβ
Client config maps menu action names to functions.
MenuActions = {
['RESUME'] = function() ClosePauseMenu() end,
['WORLD_MAP'] = function() OpenWorldMap() end,
['SETTINGS'] = function() OpenSettings() end,
['DISCONNECT'] = function() Disconnect() end,
['QUIT_GAME'] = function() QuitGame() end,
}
The encrypted client runtime exposes these global functions for action mapping:
| Function | Purpose |
|---|---|
ClosePauseMenu() | Closes the custom pause menu and returns to gameplay. |
OpenWorldMap() | Opens the GTA world map. |
OpenSettings() | Opens the GTA settings menu. |
Disconnect() | Disconnects the player from the server. |
QuitGame() | Quits the game application. |
RegisterMenuAction(actionName, actionFunc) | Registers an additional menu action handler. |
GetTimePlayed() | Returns the local playtime table. |
Localesβ
Locale files live in:
locales/*.json
Current shipped locale files include:
enfrzh-cn(cnalias)zh-tw(twalias)deitja(jpalias)koplpteshinldacs
Locale strings include welcome/player labels, player data labels, menu labels, social link text, and weather labels such as weather_extrasunny, weather_rain, and weather_thunder.
Framework data shown in UIβ
The active bridge returns:
{
playerId = GetPlayerServerId(PlayerId()),
playerName = 'Firstname Lastname',
job = 'Job Label',
cash = 0,
bank = 0,
timePlayed = { days = 0, hours = 0, minutes = 0 },
}
ESX reads account data from ESX.GetPlayerData().accounts. QBCore/QBX read money from the money.cash and money.bank fields.
Playtime databaseβ
oxmysql is used to persist time played in wasabi_playtime.
The client increments playtime every minute and syncs to the server every two minutes. Identifiers are provided by the active server bridge:
- ESX:
xPlayer.getIdentifier() - QBCore:
Player.PlayerData.citizenid - QBX:
Player.PlayerData.citizenid