NX Playerlist

Configuration

Every option in config.lua explained.

Everything is configured in config.lua. The file is server-side only. Players never download it, and the client only receives the display settings it needs. Restart the resource after making changes.

General

config.lua
Config.Command      = 'playerlist'
Config.Key          = 'F11'
Config.ServerName   = 'NX Scripts'
Config.Subtitle     = 'Player List'
Config.AccentColor  = '#8b5cf6'
Config.NameMode     = 'character'  -- 'character' or 'fivem'
Config.ShowJob      = true
Config.ShowPing     = false
Config.SortBy       = 'id'         -- 'id' or 'name'
Config.RefreshEvery = 3000         -- ms
Config.Commandstringdefault: 'playerlist'
Chat command that toggles the list.
Config.Keystringdefault: 'F11'
Default key. Players can rebind it in Settings → Key Bindings → FiveM. Changing this only affects players who haven't opened the list before. Existing players keep their saved binding.
Config.ServerNamestringdefault: 'NX Scripts'
Title shown at the top of the list.
Config.Subtitlestringdefault: 'Player List'
Smaller text under the title.
Config.AccentColorhexdefault: '#8b5cf6'
Main UI colour for highlights, buttons and the online indicator. Match it to your server's branding.
Config.NameMode'character' | 'fivem'default: 'character'
character shows the ESX character name (firstname lastname). fivem shows the player's FiveM username.
Config.ShowJobbooleandefault: true
Show each player's job and grade, for example "Police · Sergeant".
Config.ShowPingbooleandefault: false
Show each player's ping.
Config.SortBy'id' | 'name'default: 'id'
Sort players by server ID or alphabetically by name.
Config.RefreshEverynumber (ms)default: 3000
How often the list refreshes while it's open. It never refreshes while closed.
config.lua
Config.Banner = { enabled = true, url = 'assets/banner.png', height = 140 }
enabledbooleandefault: true
Show or hide the banner at the top of the list.
urlstringdefault: 'assets/banner.png'
A file in html/assets/ (written as assets/yourfile.png) or a full web link such as an imgur or Discord CDN URL.
heightnumber (px)default: 140
Banner height in pixels.

Use a wide image around 1200×280 so it stays sharp. PNG, JPG, WEBP and GIF all work.

Header buttons

The buttons in the top right of the list. Add, remove or reorder them as you like.

config.lua
Config.Links = {
    { label = 'Discord', icon = 'fa-brands fa-discord',      url = 'https://discord.gg/yourserver' },
    { label = 'Store',   icon = 'fa-solid fa-cart-shopping', url = 'https://yourstore.tebex.io' },
}
labelstring
Button text.
iconstring
Any free Font Awesome 6 icon class, for example fa-solid fa-globe.
urlstring
Link opened in the player's browser.

Roles

Roles power the counters in the header and the badges on player profiles. They have their own page: Roles & Job Counts.

config.lua
Config.IdentifierSearch = { enabled = true, staffOnly = true, groups = { 'admin', 'superadmin', 'mod' } }
Config.ShowDiscordId    = true
IdentifierSearch.enabledbooleandefault: true
Allow searching by FiveM ID, Discord ID and Discord username, on top of the normal name and server ID search.
IdentifierSearch.staffOnlybooleandefault: true
Only players in groups can search by identifiers. Everyone else never receives identifiers at all. They aren't just hidden, they're never sent to the client.
IdentifierSearch.groupstabledefault: { 'admin', 'superadmin', 'mod' }
ESX groups allowed to search by identifiers.
Config.ShowDiscordIdbooleandefault: true
Show the Discord ID on player profiles. Only visible to players who are allowed to search by identifiers.

Setting staffOnly = false sends every player's FiveM and Discord identifiers to everyone on the server. We recommend keeping it on.

Discord

config.lua
Config.UseDiscordAvatars = true
Config.DiscordBotToken   = 'PASTE-HERE'

See Discord Integration for the full setup.

Full default config

config.lua
Config = {}

-- General
Config.Command      = 'playerlist'
Config.Key          = 'F11'
Config.ServerName   = 'NX Scripts'
Config.Subtitle     = 'Player List'
Config.AccentColor  = '#8b5cf6'
Config.NameMode     = 'character'  -- 'character' or 'fivem'
Config.ShowJob      = true
Config.ShowPing     = false
Config.SortBy       = 'id'         -- 'id' or 'name'
Config.RefreshEvery = 3000         -- ms

-- Banner (web link or a file in html/assets/)
Config.Banner = { enabled = true, url = 'assets/banner.png', height = 140 }

-- Header buttons (Font Awesome icons)
Config.Links = {
    { label = 'Discord', icon = 'fa-brands fa-discord',      url = 'https://discord.gg/nxscripts' },
    { label = 'Store',   icon = 'fa-solid fa-cart-shopping', url = 'https://nxscripts.com' },
}

-- Roles (groups = ESX admin groups, jobs = ESX job names)
Config.OnDutyOnly = true
Config.Roles = {
    { id = 'staff',  label = 'Staff',  icon = 'fa-solid fa-user-shield',   color = '#8b5cf6', groups = { 'admin', 'superadmin', 'mod' } },
    { id = 'police', label = 'Police', icon = 'fa-solid fa-handcuffs',     color = '#3b82f6', jobs = { 'police', 'sheriff' } },
    { id = 'ems',    label = 'EMS',    icon = 'fa-solid fa-truck-medical', color = '#ef4444', jobs = { 'ambulance' } },
}

-- Search by FiveM / Discord ID (staffOnly keeps identifiers away from regular players)
Config.IdentifierSearch = { enabled = true, staffOnly = true, groups = { 'admin', 'superadmin', 'mod' } }
Config.ShowDiscordId    = true  -- show Discord ID in the profile (only for players who can search by it)

-- Discord profile pictures + banners (false = show server ID)
-- Token: discord.com/developers/applications > Bot > Reset Token. Server-only, players can't see it.
Config.UseDiscordAvatars = true
Config.DiscordBotToken   = 'PASTE-HERE'