FiveM Docs
Addons

esx_pausemenu

esx_pausemenu replaces the GTA pause screen with a branded ESX Legacy NUI menu showing character, money, job and links. Install and config guide.

esx_pausemenu replaces the GTA V pause screen with a branded NUI menu for ESX Legacy. When a loaded player presses ESC or P, it shows their character name, job, cash, bank, play time, ping, location, server time and online player count, plus buttons for the map, game settings, news, Discord, rules and leaving the server.

Overview

Resourceesx_pausemenu (version 1.0.0, added with ESX Legacy 1.16.0)
SideClient NUI with one server callback
Dependenciesesx_lib, es_extended
Optionalesx_scoreboard for the online players button
DatabaseNone

The menu is plain HTML, CSS and JavaScript in web/, so there is no build step. It uses xLib.colors from esx_lib, so it follows your ESX theme convars automatically.

Installation

server.cfg
ensure esx_lib
ensure es_extended
ensure esx_scoreboard  # optional
ensure esx_pausemenu

Then set your own links in config.lua (at least Config.Links.discord and Config.Links.rules) and restart the resource.

How it works

  1. A client loop disables controls 200 and 199 (the two pause inputs) every frame while the player is loaded.
  2. When one of them is released, the client calls the server callback esx_pausemenu:getData.
  3. The server returns player data and the client opens the NUI with blur, the theme, the clock and the street name.
  4. Map and Settings close the NUI and open the native FE_MENU_VERSION_MP_PAUSE frontend. Resume or ESC closes it.

The menu does not open before ESX.PlayerLoaded is true, so the character selection screen keeps the normal pause behavior. It closes automatically on esx:onPlayerLogout.

Configuration

All keys in config.lua:

KeyDefaultDescription
Config.Localeesx:locale convar, then ESX config, then "en"Language for UI text
Config.Brand.kicker"FIVEM ROLEPLAY"Small text above the title
Config.Brand.title"ESX LEGACY"Big title; also the server name fallback
Config.Brand.tagline"ROLEPLAY BEYOND LIMITS"Line under the title
Config.Brand.city"Los Santos"City shown in the location block
Config.Brand.established"2015""Established" year
Config.Brand.communityLine"BUILT BY A COMMUNITY THAT CARES"Footer line
Config.Links.discord"https://discord.gg/esx-framework"Discord button; empty disables it
Config.Links.rules"https://esx-framework.org/"Rules button; empty disables it
Config.Links.store""Optional store link in the news dialog
Config.News{}List of { title, body, date } entries
Config.PeopleCommand"scoreboard"Command run by the online players chip
Config.Controls.pause200ESC control id
Config.Controls.pauseAlt199P control id
Config.ScreenBlurMs180Blur fade duration in ms
Config.DebugfalsePrint debug messages
config.lua
Config.News = {
    { title = "Police recruitment open", body = "Apply on our Discord.", date = "20 OCT 2026" },
    { title = "Server restart times", body = "Daily at 06:00 and 18:00.", date = "01 OCT 2026" },
}

News text is shown as plain text, and the UI shows up to 20 entries.

The server name in the header comes from the sv_projectName convar, then sv_hostname, then Config.Brand.title. GTA color codes like ^1 are stripped.

Callbacks, events and commands

esx_pausemenu:getData (server callback)

ESX.TriggerServerCallback('esx_pausemenu:getData', function(data) end)

Returns nil if the player is not loaded or the rate limit is hit (2 requests burst, refilling 1 every 750 ms). Otherwise it returns:

FieldTypeDescription
idnumberServer id
namestringFiveM player name
characterNamestringxPlayer.getName()
sexstring?xPlayer.get('sex')
pingnumberPlayer ping
role, jobstringJob label (localized "unemployed" for unemployed)
jobNamestringJob name
bank, cashnumberAccount balances
playTimenumberxPlayer.getPlayTime() in seconds
players, maxPlayersnumberOnline count and sv_maxclients
serverNamestringSee above

The callback only returns the caller's own data, so it is safe to leave exposed.

esx_pausemenu:leaveServer (server net event)

Drops the player who triggers it with the localized leave_reason. A client can only kick itself, so this is not a security concern.

/esx_pausemenu (client command)

Toggles the menu. Use it to bind the menu to another key or to open it from another script with ExecuteCommand('esx_pausemenu').

Integration tips

  • HUDs: the menu calls HideHudAndRadarThisFrame() while open, which only hides native GTA HUD elements. NUI HUDs such as esx_hud react to esx:pauseMenuActive, which es_extended fires for the native pause menu only, so they stay underneath the full-screen NUI.
  • Theme: change colors with the esx:brand-color, esx:darkest-color and related setr convars that esx_lib reads; no file edits needed.
  • Languages: UI strings are the ui_* keys in locales/*.lua (en, fr, de, es, it, nl, pl). Missing languages fall back to English.
  • Other pause menus: do not run esx_pausemenu together with another resource that disables controls 199 and 200, or both will fight over ESC.

Common issues

  • ESC opens the normal GTA menu: the player is not loaded yet, the resource failed to start (check that esx_lib is started first), or the callback returned nil.
  • Menu flickers open and closed: another script also opens the pause menu on ESC. Remove one of them.
  • Map closes immediately: a third-party script calls SetPauseMenuActive(false) every frame.

Frequently asked questions

Independent documentation

esx-fivem.com is a community project and is not affiliated with the ESX Framework team. Facts on this page were checked against the upstream source. Official resources: docs.esx-framework.org and github.com/esx-framework.
Edit on GitHub

Last updated on

On this page