Skip to main content

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​

OptionTypeDescription
Config.DebugbooleanEnables verbose debug logging through lib.print.debug. When enabled, the server debug module raises this resource's ox_lib print level to debug.
Config.CheckForUpdatesbooleanEnables the built-in update check on resource start.
Config.LanguagestringLocale code loaded from locales/*.json. The loader supports legacy cn, tw, and jp aliases for zh-cn, zh-tw, and ja.
Config.CurrencySymbolstringCurrency symbol displayed for cash and bank values.
Config.CurrencySymbolPositionstringleft or right, controlling whether the currency symbol appears before or after the value.
Config.UIColorstringUI accent color used for highlights, player name, and category cards.
Config.MenuOptionstableMain option buttons displayed in the pause menu.
Config.SocialLinkstableFooter social/link cards. Maximum of three is recommended by the config comments.

Each entry in Config.MenuOptions supports:

FieldDescription
iconBuilt-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.
labelText displayed on the option.
actionAction identifier. Must match an entry in MenuActions or an action registered with RegisterMenuAction.
colorOptional hex color for the icon/text. Uses default styling when nil.

Each entry in Config.SocialLinks supports:

FieldDescription
iconBuilt-in icon (discord, youtube, tebex) or custom image URL.
titleMain title text.
descriptionSubtitle/description text.
linkURL opened when the user selects the social link.
colorAccent 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:

FunctionPurpose
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:

  • en
  • fr
  • zh-cn (cn alias)
  • zh-tw (tw alias)
  • de
  • it
  • ja (jp alias)
  • ko
  • pl
  • pt
  • es
  • hi
  • nl
  • da
  • cs

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