Skip to content

Rexshack-RedM/rsg-playerinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rsg_framework

🧾 rsg-playerinfo

Player information / quick stats display for RedM (RSG Core).

Platform License

Shows a small context menu with the player's name and configurable stats (outlaw status, job, cash, banks, IDs, etc.).
Triggered via the /info command and built with lib contexts (ox_lib).


🛠️ Dependencies

  • rsg-core (framework & player data)
  • ox_lib (context menu & locale)

Locales included: en, fr, es, it, de, el, ro
License: GPL‑3.0


✨ Features

  • 🔎 /info command opens a context menu showing player details.
  • 📋 Configurable fields: outlaw status, job, job grade, cash, bloodmoney, multiple bank balances, Citizen ID and Server ID.
  • 🧭 Uses lib.registerContext (ox_lib) to display the menu in the top-right.
  • 🔁 Server callback (rsg-playerstats:server:getPlayerData) provides data to the client.
  • 🌍 Multi-language support via lib.locale().

⚙️ Configuration (config.lua)

The config.lua exposes Config.PlayerInfoSetup with the following boolean flags:

Config = {}

Config.PlayerInfoSetup = {
    show_outlawstatus = true,
    show_job = true,
    show_job_grade = true,
    show_cash = true,
    show_bloodmoney = true,
    show_bank = true,
    show_valbank = true,
    show_blkbank = true,
    show_armbank = true,
    show_rhobank = true,
    show_citizenid = true,
    show_serverid = true,
}

Toggle any of these to show/hide the corresponding row in the /info context menu.


🔁 How it works

  • RSGCore.Commands.Add('info', ...) registers the /info command which triggers the client event rsg-playerstats:client:openPlayerStats.
  • The client calls the server callback rsg-playerstats:server:getPlayerData to receive a table with fields such as outlawstatus, job, grade, cash, bloodmoney, bank, valbank, rhobank, blkbank, armbank, and citizenid.
  • The client builds optionsArray depending on Config.PlayerInfoSetup flags and displays the result through lib.showContext('player_info').

📂 Installation

  1. Place rsg-playerinfo in your resources/[rsg] folder.
  2. Ensure rsg-core and ox_lib are installed.
  3. Add to your server.cfg:
ensure ox_lib
ensure rsg-core
ensure rsg-playerinfo
  1. Restart your server.

🌍 Locales

English keys:

{
  "sv_view_stats" : "View stats",
  "sv_outlawstatus_a" : "Law Abiding Citizen",
  "sv_outlawstatus_b" : "Petty Criminal",
  "sv_outlawstatus_c" : "OutLaw",
  "cl_outlawstatus" : "Outlaw Status",
  "cl_job" : "Job",
  "cl_job_grade" : "Job Grade",
  "cl_funds_in_cash" : "Funds in cash",
  "cl_funds_in_bloodmoney" : "Funds in bloodmoney",
  "cl_funds_in_bank" : "Funds in St.Denis bank",
  "cl_funds_in_rhobank" : "Funds in Rhodes bank",
  "cl_funds_in_valbank" : "Funds in Valentine bank",
  "cl_funds_in_blkbank" : "Funds in Blackwater bank",
  "cl_funds_in_armbank" : "Funds in Armadillo bank",
  "cl_citizenid" : "Citizen ID",
  "cl_serverid": "Server ID",
  "cl_no_data" : "No data"
}

💎 Credits

  • RexshackGaming — Original author
    🔗 https://github.com/Rexshack-RedM
  • RSG / Rexshack-RedM — adaptation & maintenance
  • Community contributors & translators
  • License: GPL‑3.0

Releases

No releases published

Packages

 
 
 

Contributors

Languages