sh-admin resource gives RedM staff a centralized administration toolkit through a NUI panel, hotkeys, and chat commands. It supports online player management, teleport tools, spectating, report handling, warns, kicks, bans, unbans, inventory grants, finance adjustments, job tools, offline player management, maintenance mode, Discord webhook logging, trust score enforcement, and developer tools.
Access is validated server-side for every sensitive action. The primary permission source is Discord role membership through the Discord API, with ACE permissions, framework groups, framework jobs, and command ACE as fallback sources.
Requirements
- RedM server using
fx_version 'cerulean'andgame 'rdr3' oxmysql, started beforesh-admin- One supported framework:
- VORP
- RSG / RSG Core
- MySQL or MariaDB database access for the tables in
install/sql.sql - Discord bot token and guild ID if Discord role permissions, whitelist, or bot presence are enabled
- The folder/resource must be named exactly
sh-admin
lua54 'yes' and node_version '22'. The Node runtime is used by server/discord_presence.js when Discord bot live presence is enabled.
Installation
1
Install dependencies
Ensure
oxmysql and your framework resource are installed and working.2
Add the resource
Copy the folder into your server resources directory and keep the folder name as
sh-admin.3
Import SQL
Run
install/sql.sql against your database.4
Configure server.cfg
Start dependencies first, then start
sh-admin.server.cfg
5
Configure permissions
Add Discord role IDs and/or ACE permissions before opening the panel on a live server.
6
Restart and verify
Restart the server, join with a permitted account, and open the panel with
/admin or PageDown.Framework Support
Set framework detection inconfig.lua:
config.lua
config.lua
Permissions
Permission checks run in this order:- Discord role permissions from
Config.DiscordRoles - Action-specific ACE nodes from
Config.Permissions.Ace.Map - Framework user groups and character groups from
Config.Permissions.UserGroups - Framework job allowlist from
Config.Permissions.Jobs - Final command ACE fallback such as
command,group.admin,rsgcore.admin, orrsgcore.god
Discord Role Permissions
Configure your bot token, guild ID, role buckets, and action mappings:config.lua
ACE Fallback
Use ACE permissions when Discord role checks are disabled, unavailable, or not desired for a specific deployment:server.cfg
Common Action Keys
Commands
All public command names are configurable inConfig.Commands.
Command examples:
The report and request commands use a pipe character (
|) between the short title and the full message when arguments are supplied. With no arguments, they open the compact NUI report form when Config.Reports.OpenPromptOnCommand is enabled.Hotkeys
config.lua
sh_admin_open and sh_admin_noclip; those forward to server-side permission checks.
Admin Panel Tabs
Dashboard
Dashboard
Shows online player count, report counts by status, selected player summary, recent reports, and quick buttons for Players, Reports, and data refresh.
Self
Self
Includes teleport to marker, self revive, noclip, invisibility, god mode, player IDs, player blips, self item or weapon grants, and self finance tools.
Players
Players
Shows live player list data including source ID, name, job, and ping. Staff can view profile/history, open inventory, goto, bring, spectate, freeze/unfreeze, grant items or weapons, adjust money, set or remove jobs, warn, kick, and ban.
Reports
Reports
Players can submit reports. Staff can filter reports, view nearby player snapshots, claim or unclaim, add staff notes, reply to the reporter, change status, delete reports, goto/bring the reporter, and teleport back after assisting.
Dev Tools
Dev Tools
Includes coordinate copy formats, item database editor, item catalog loading, horse and wagon spawning, nearest horse/wagon deletion, zone clearing, and entity lookup by network ID.
Punishments
Punishments
Provides configurable Ban QuickSets, Reason Catalog auto-duration matching, active ban listing, and unban tools.
Offline
Offline
Searches indexed offline players by name, character ID, or identifier. Staff can add notes, queue finance changes, force queue sync if the player is online, and apply offline bans.
Operations
Operations
Controls maintenance join lock and full-screen staff broadcasts. Recent broadcast history is stored and shown in the panel.
Reports
Report behavior is configured inConfig.Reports:
config.lua
AssistPedModel = nil to disable the temporary model. Set RestoreCharacterCommand = nil or false if your framework should not run a restore command.
Bans And Punishments
/ban and the panel support temporary bans and permanent bans. A ban duration of 0 means permanent. Active bans are checked during playerConnecting.
config.lua
Trust Score And Playtime
sh-admin tracks account-wide playtime and trust score usingsh_admin_trustscore.
config.lua
/myplaytime.
Whitelist
The join whitelist uses Discord role IDs:config.lua
FailClosed is true, players are denied when Discord API checks are unavailable. Staff can bypass with any configured maintenance or whitelist bypass ACE.
Maintenance Mode
Maintenance mode blocks new joins while allowing configured ACE bypasses:config.lua
Discord Webhooks
Admin actions, reports, bans, finances, jobs, devtools actions, and security events can log to Discord webhooks.config.lua
Default.
Discord Bot Presence
The optional Discord bot presence updater connects to the Discord Gateway and updates the bot activity text.config.lua
{server}, {players}, {max}, {uptime}, {uptime_seconds}, {uptime_days}, {uptime_hours}, and {uptime_minutes}.
Item And Weapon Tools
The player and self grant pickers use framework catalogs plus thesh_admin_items item editor table. Catalog size can be tuned:
config.lua
items table when running VORP. For RSG, it stores editor rows in sh_admin_items and prints an RSG item snippet to the server console.
Database Tables
The install SQL creates these tables:
The script also creates or migrates some item editor columns at runtime.
Exports
Other resources can check admin access or frozen state:HasAdminAccess accepts any sh-admin action key and runs the same server-side permission logic.
Localization
Set the active locale inconfig.lua:
config.lua
locales/*.lua and can be edited because they are included in escrow_ignore.