gfxr-leaderboard

React-based leaderboard UI for RedM/FiveM. Displays player statistics and rankings with switchable stat categories.

Features

  • Ranked player list with statistics

  • Multiple stat categories (Kills, Deaths, K/D Ratio, etc.)

  • Player self-data highlighting

  • Player avatars and usernames

  • Modern React + TypeScript + Redux frontend

  • Multi-language support

Dependencies

Dependency
Description

Framework

ESX or QBCore (auto-detected)

SQL Driver

One of: oxmysql, ghmattimysql, mysql-async

Installation

  1. Add to server.cfg:

    ensure gfxr-leaderboard
  2. Build the UI (if not pre-built):

    cd resources/[gfx]/gfxr-leaderboard/web
    npm install
    npm run build
  3. Configure:

    • config/locale.lua - Language translations

Configuration

locale.lua

Commands

Command
Description

/show-nui

Opens the leaderboard UI

NUI Callbacks

These callbacks must be implemented on the server side to provide data:

getStatKeys

Returns available stat categories for the leaderboard tabs.

getItems

Returns leaderboard entries for a specific stat.

closeMenu

Called when the player closes the leaderboard.

Debug Mode

Enable debug mode via server convar:

Development

For hot-reload during development:

Last updated