Skip to main content
Complete installation, podium, provider, theme, and configuration reference.
fnx-pvp-leaderboard collects rankings from registered PVP providers and displays them in the panel and on optional in-world podiums.

First installation

ensure oxmysql
ensure community_bridge

ensure fnx-pvp-panel
ensure fnx-pvp-leaderboard
Start gameplay plugins after the leaderboard. This resource does not create its own database tables. oxmysql is used to read podium skin data from your framework’s existing tables.

First setup

  1. Configure the panel entry and theme in settings/public/client/cfg.lua.
  2. Configure ranking cache and podiums in settings/public/server/cfg.lua.
  3. Replace every vec4(0, 0, 0, 0) podium coordinate before enabling that podium.
  4. Confirm that skinProvider matches your clothing resource and that PodiumSkin.Resolve matches its database.

Client configuration

Panel plugin

KeyTypeDefaultExplanation
ClientCfg.Plugin.idstring"leaderboard"Unique ID used to register and open this panel plugin. Do not reuse it for another plugin.
ClientCfg.Plugin.labelKeystring"plugins.leaderboard.label"Locale key used as the plugin title.
ClientCfg.Plugin.descriptionKeystring"plugins.leaderboard.description"Locale key used as the plugin description.
ClientCfg.Plugin.iconstring"fa-solid fa-trophy"Font Awesome CSS class displayed by the panel.
ClientCfg.Plugin.resourcestringcurrent resourceResource that owns the plugin. Keep GetCurrentResourceName() unless you intentionally rename/integrate it.
ClientCfg.Plugin.uistring"web/dist/index.html"Built NUI page loaded for the plugin.
ClientCfg.Plugin.ordernumber15Sort position inside the PVP panel; lower values appear earlier.
ClientCfg.Plugin.enabledbooleantrueRegisters and shows the plugin when true.

Server configuration

Leaderboard cache

KeyTypeDefaultExplanation
ServerCfg.Leaderboard.refreshSecondsnumber150Seconds between automatic provider refreshes. Lower values are fresher but call providers more often.
ServerCfg.Leaderboard.limitnumber250Maximum number of entries kept/requested for the global snapshot.
ServerCfg.Leaderboard.sortMetricstring"elo"Default metric. Supported configured values are elo, wins, kills, and kd.

Skin resolver

KeyTypeExplanation
ServerCfg.PodiumSkin.ResolvefunctionReceives identifier and returns stored skin data or nil. The included function checks users.skin for ESX and active playerskins.skin rows for QBCore/Qbox. Edit its SQL if your schema differs.
identifierstringFramework identifier passed into the resolver after trimming.

Podium entries

ServerCfg.Podiums is an array. Every podium object uses these keys:
KeyTypeExplanation
enabledbooleanCreates this podium when true. Disable it while coordinates or skin integration are incomplete.
idstringUnique internal podium ID. Each podium needs a different value.
labelstringHuman-readable podium name used for identification/debugging.
metricstringMetric requested from the selected provider, such as elo, wins, kills, or kd.
providerstringRegistered provider ID. Official examples use match; it must match the provider’s registration ID exactly.
drawDistancenumberMaximum distance in game units at which podium peds are managed/drawn.
resourcestring or string arrayMap/resource requirement for this podium. Use the resource names associated with that location.
excludedIdentifiersarrayIdentifiers that must be skipped when selecting ranked players for this podium.
skinProviderstringClothing integration returned by the bridge or one of the supported configured providers: fivem-appearance, illenium-appearance, qb-clothing, or esx_skin.
slotsarrayOrdered podium positions. The first slot represents rank 1, the second rank 2, and the third rank 3.
Each object inside slots uses:
KeyTypeExplanation
coordsvector4Ped X, Y, Z, and heading. Zero coordinates are placeholders and must be replaced.
modelstringFallback GTA ped model, normally a freemode model when loading player appearance.
scenariostring or nilGTA scenario played by the podium ped. Set nil for no scenario.
loadSkinfunctionCalled with self, identifier, and entry; it must return appearance data. The default forwards to PodiumSkin.Resolve.

Shared files

The shared private file initializes the bridge, framework enum, debug printing, string helpers, JSON helpers, deep copying, and locale flattening. It exposes no customer cfg keys; edit public cfg files instead.

Theme system

All color values are CSS strings. Radii are pixels and fonts are CSS font-family lists.

General colors

KeyDefaultExplanation
colors.panelBg#0b0b10Main leaderboard background.
colors.panelBgStrong#070709Darker background variant.
colors.accent#f97316Primary highlight.
colors.accentStrong#fb923cStrong active highlight.
colors.text#f5f5f5Primary text.
colors.mutedTextrgba(245,245,245,0.62)Secondary text.
colors.surfacergba(23,23,23,0.62)Normal row/card surface.
colors.surfaceStrongrgba(10,10,10,0.94)Strong surface.
colors.borderrgba(255,255,255,0.10)Borders and separators.
colors.overlayrgba(0,0,0,0.72)Modal overlay.
colors.success#4ade80Success foreground.
colors.successBgrgba(34,197,94,0.16)Success background.
colors.danger#f87171Error foreground.
colors.dangerBgrgba(239,68,68,0.16)Error background.
colors.warning#fbbf24Warning foreground.
colors.warningBgrgba(245,158,11,0.16)Warning background.
colors.info#60a5faInformation foreground.
colors.infoBgrgba(59,130,246,0.16)Information background.

Rating colors

KeyDefaultExplanation
colors.ratingElite#ffd51dElite-tier color.
colors.ratingMaster#ff6754Master-tier color.
colors.ratingDiamond#ff35e3Diamond-tier color.
colors.ratingPlatinum#e077ffPlatinum-tier color.
colors.ratingGold#7fa0ffGold-tier color.
colors.ratingSilver#78e0ffSilver-tier color.
colors.ratingBase#d6e1ecBase/unranked color.
KeyDefaultExplanation
colors.dropdownBgrgba(10,10,10,0.94)Closed dropdown background.
colors.dropdownBorderrgba(255,255,255,0.14)Dropdown border.
colors.dropdownText#f5f5f5Selected-value text.
colors.dropdownArrowrgba(255,255,255,0.86)Dropdown arrow.
colors.dropdownFocusrgba(249,115,22,0.36)Focus outline/glow.
colors.dropdownOptionBg#111217Option-list background.
colors.dropdownOptionText#f5f5f5Normal option text.
colors.dropdownOptionHoverBgrgba(249,115,22,0.18)Hovered option background.
colors.dropdownOptionActiveBgrgba(249,115,22,0.38)Selected option background.
colors.dropdownOptionActiveText#ffffffSelected option text.

Podium UI colors

KeyDefaultExplanation
colors.podiumGold#ffd65aRank-one foreground.
colors.podiumSilver#cfd8e3Rank-two foreground.
colors.podiumBronze#d58b51Rank-three foreground.
colors.podiumGoldBgrgba(255,214,90,0.10)Rank-one background.
colors.podiumSilverBgrgba(207,216,227,0.10)Rank-two background.
colors.podiumBronzeBgrgba(213,139,81,0.10)Rank-three background.

Radii and fonts

KeyDefaultExplanation
radii.panel12Main panel radius in pixels.
radii.card8Card/row radius in pixels.
radii.control8Filter control radius in pixels.
radii.pill999Fully rounded badge radius.
fonts.bodySpace Grotesk...Normal-text font stack.
fonts.displayBebas Neue...Heading font stack.

Developer info

Server exportParametersResult/purpose
GetEntriesmetric, limitReturns entries for one metric with an optional limit.
GetSnapshotnoneReturns the current cached leaderboard snapshot.
RefreshnoneForces provider refresh; do not call it for every kill.
RegisterProviderpluginId, providerRegisters or replaces one server-side provider.
UnregisterProviderpluginIdRemoves the provider registered under that ID.
Use the official Matches, Lobbies, Redzone, or Aimlab server code as the canonical provider-shape example.

Common issues

Peds appear at 0, 0, 0

The v1 and v2 examples contain zero coordinates. Replace every enabled slot coordinate.

A skin is missing

Verify skinProvider, identifier type, database table, active flag, and skin JSON. Adapt PodiumSkin.Resolve for custom schemas.

A provider is missing

Start the leaderboard before gameplay plugins and ensure provider exactly matches their registration ID.

Rankings feel old

Reduce refreshSeconds carefully or call Refresh() after a meaningful batch update.

The filter keeps the old colors

Dropdowns have dedicated dropdown* keys; changing only surface does not restyle all dropdown states.

Common folders

PathWhat it is for
fxmanifest.luaFiveM manifest. It loads the resource files in the correct order.
settings/public/client/cfg.luaClient settings that server owners are expected to edit.
settings/public/server/cfg.luaServer settings that server owners are expected to edit.
settings/private/**/_cfg.luaInternal/default settings. Do not edit unless you are modifying the resource itself.
client/public/*.luaPublic client API files and safe integration files.
client/private/*.luaInternal client runtime code.
server/public/*.luaPublic server API files and exports.
server/private/*.luaInternal server runtime code.
shared/public/*.luaShared public data or integration constants.
shared/private/*.luaShared internal helpers loaded by the resource.
locales/*.jsonLocales for ui and game.
web/dist/Built NUI files used in-game. Do not edit these by hand.
fnx-pvp-leaderboard/
|-- client/
|   |-- private/
|   |   \-- _main.lua
|   \-- public/
|       |-- draw.lua
|       |-- esx_skin.lua
|       |-- fivem_appearance.lua
|       |-- illenium_appearance.lua
|       \-- qb_clothing.lua
|-- locales/
|   \-- *.json
|-- server/
|   |-- private/
|   |   \-- _main.lua
|   \-- public/
|       \-- main.lua
|-- settings/
|   |-- private/
|   |   |-- client/
|   |   |   \-- _cfg.lua
|   |   \-- server/
|   |       \-- _cfg.lua
|   \-- public/
|       |-- client/
|       |   \-- cfg.lua
|       \-- server/
|           \-- cfg.lua
|-- shared/
|   \-- private/
|       \-- _main.lua
|-- web/
|   \-- dist/
\-- fxmanifest.lua