Skip to main content
The sh-admin resource gives your server staff a centralized administration toolkit accessible through a NUI panel and chat commands. Player management, teleportation, spectating, kicks, warns, bans, inventory tools, finance adjustments, and developer utilities all live in one interface. Access is gated by a dual-layer permission system: Discord role IDs checked live against the Discord API, with ACE permissions as a fallback. Every admin action is logged to configurable per-channel Discord webhooks. Additional systems include a trust score tracker, a player report/ticket queue, a join whitelist, maintenance mode, and offline player management. Both VORP and RSG frameworks are supported.

Framework Support

sh-admin supports both VORP and RSG frameworks. Set the framework in your server-side config.lua:
config.lua
Config.Framework = 'auto'  -- 'auto', 'vorp', or 'rsg'

Permission System

sh-admin uses two permission sources that work together. Discord role IDs are the primary source; ACE permissions are the secondary fallback. Both can be active simultaneously.

Discord Role Permissions

Configure your Discord bot token, guild ID, and map role bucket names to Discord role IDs:
config.lua
Config.DiscordRoles = {
    Enabled = true,
    Api = {
        Enabled      = true,
        BotToken     = '',  -- your Discord bot token
        GuildId      = '',  -- your Discord server/guild ID
        CacheSeconds = 60,
    },
    AdminRoles = {
        superadmin = { '111111111111111111' },
        admin      = { '222222222222222222' },
        mod        = { '333333333333333333', '444444444444444444' },
    },
    ActionRoles = {
        ['menu.open']        = { 'mod', 'admin', 'superadmin' },
        ['player.kick']      = { 'admin', 'superadmin' },
        ['player.ban']       = { 'admin', 'superadmin' },
        ['player.warn']      = { 'mod', 'admin', 'superadmin' },
        ['player.freeze']    = { 'mod', 'admin', 'superadmin' },
        ['player.spectate']  = { 'mod', 'admin', 'superadmin' },
        ['player.teleport']  = { 'mod', 'admin', 'superadmin' },
        ['finances.add']     = { 'admin', 'superadmin' },
        ['jobs.set']         = { 'admin', 'superadmin' },
        -- see config.lua for the full ActionRoles map
    },
}

ACE Permission Fallback

Each action also maps to an ACE node in Config.Permissions.Ace.Map. Add these to server.cfg to grant access when Discord role checks are unavailable or disabled:
server.cfg
add_ace group.admin sh.admin.menu    allow
add_ace group.admin sh.admin.ban     allow
add_ace group.admin sh.admin.kick    allow
add_ace group.mod   sh.admin.menu    allow
add_ace group.mod   sh.admin.kick    allow

add_principal identifier.steam:110000112345678 group.admin
sh-admin validates permissions server-side on every action. Editing client-side files does not bypass the permission checks — all sensitive operations are verified before execution.

Commands

CommandConfig keyDescription
/adminConfig.Commands.AdminOpen the admin panel
/reportConfig.Commands.ReportSubmit a player report
/requestadminConfig.Commands.RequestAdminRequest admin assistance
/unstuckConfig.Commands.UnstuckSelf-teleport to nearby ground level
/myplaytimeConfig.Commands.MyPlaytimeView your account playtime and trust score
/noclipConfig.Commands.NoClipToggle admin noclip
/adminmodeConfig.Commands.AdminModeToggle composite admin mode (ghost, god, IDs, STAFF tag)
/tpmConfig.Commands.TeleportMarkerTeleport to map waypoint
/invisConfig.Commands.InvisibleToggle admin invisibility
/kickConfig.Commands.KickKick a player by server ID
/warnConfig.Commands.WarnWarn a player by server ID
/banConfig.Commands.BanBan a player by server ID
/gotoConfig.Commands.GoToTeleport to a player
/bringConfig.Commands.BringBring a player to your position
The admin panel default hotkey is PageDown (0x3C3DD371). NoClip defaults to F4 (0x1F6D95E5). Both are configurable in Config.Keys.

Feature Highlights

The NUI panel opens with a live list of all connected players showing server ID, character name, identifiers, ping, and current job. Click any player entry to access the full action menu: view inventory, teleport, spectate, freeze, give items, give weapons, adjust finances, set job, kick, warn, or ban.
Attach your camera to any connected player and observe their gameplay without being visible to them. Press the exit key to detach and return to your character.
Toggle invincibility and noclip individually or together via Admin Mode (/adminmode). God mode is session-only and resets on disconnect. NoClip can be bound to a configurable hotkey.
Ban a player with a mandatory reason and optional duration (0 = permanent). The Punishments tab provides configurable Ban QuickSet buttons for common infractions (e.g. RDM, toxicity, cheating) so staff can apply standard bans with one click. A Reason Catalog auto-suggests durations when staff type a known reason prefix.
Players submit reports via /report. Staff see an in-panel report queue with the submitting player’s nearby context snapshot. Staff can claim, respond, teleport to, or bring the reporting player. Report status flows through open → claimed → resolved → closed.
Search for offline players by name or identifier and perform actions such as adding notes, issuing offline bans, and adjusting queued finances — without the player needing to be online.
Developer utilities include item/weapon spawning pickers, a coordinate logger, entity browser, and zone cleaner. These are gated behind the devtools.* action roles so they can be restricted to senior staff.
Toggle server maintenance mode from the Operations tab. When active, new joins are blocked with a custom message. Staff with the sh.admin.maintenance.bypass ACE can still join. A full-screen broadcast banner can be pushed to all online players.

Trust Score System

sh-admin tracks a trust score per player account. Scores start at 80 (configurable) and gain +2 every 2 hours of playtime. Infractions reduce the score:
InfractionDefault score loss
Warn−10
Kick−15
Temp ban−35
Perm ban−90
When a score falls below the AutoBan.Threshold (default: 30), the player is automatically banned for AutoBan.DurationDays (default: 7 days). Players can view their own score with /myplaytime.

Join Whitelist

sh-admin includes a Discord role-based join whitelist. When enabled, only players holding at least one of the RequiredRoleIds Discord roles can connect:
config.lua
Config.Whitelist = {
    Enabled        = true,
    FailClosed     = true,  -- deny join if Discord API is unavailable
    RequiredRoleIds = {
        '111111111111111111',
    },
    BypassAce = { 'sh.admin.whitelist.bypass' },
}

Discord Webhook Logging

Every admin action is logged to configurable per-channel webhooks:
config.lua
Config.Webhooks = {
    Enabled  = true,
    Username = 'sh-admin',
    Default  = '',  -- fallback URL
    Channels = {
        admin_actions = '',
        reports       = '',
        bans          = '',
        finances      = '',
        jobs          = '',
        devtools      = '',
        security      = '',
    },
}

sh-doctorjob Integration

When sh-doctorjob is running, admin revive and heal actions route through sh-doctorjob’s handlers for proper state sync. Configure this in Config.Integrations:
config.lua
Config.Integrations = {
    sh_doctorjob = {
        Enabled      = true,
        Resource     = 'sh-doctorjob',
        ReviveExport = 'HandleExternalRevive',
        HealExport   = 'HandleExternalHeal',
    },
    Revive = {
        Mode               = 'both',  -- 'doctorjob', 'vorp_core', or 'both'
        ApplyHeal          = true,
        FallbackClientRevive = true,
    },
}

Installation

1

Add the resource

Copy the sh-admin folder into your server’s resources directory.
2

Add to server.cfg

Add ACE permission entries before the ensure line, then ensure sh-admin after your framework:
server.cfg
# ACE fallback permissions
add_ace group.admin sh.admin.menu allow
add_ace group.admin sh.admin.ban  allow
add_principal identifier.steam:110000112345678 group.admin

ensure vorp_core  # or rsg-core
ensure sh-admin
3

Import the SQL file

Run the SQL files from the install/ folder against your database to create the ban records, reports, and trust score tables.
4

Configure Discord permissions

Add your Discord BotToken and GuildId to Config.DiscordRoles.Api. Map your Discord role IDs to AdminRoles buckets and configure ActionRoles to control which buckets can perform each action.
5

Configure webhooks

Add your Discord webhook URLs to Config.Webhooks.Channels for each log type you want to capture.
6

Restart and verify

Restart the server, join with an account that has the required Discord role or ACE, and open the panel with the PageDown key. Confirm the player list loads and test a teleport to verify permission checks are working correctly.
Never add sh.admin.menu or any sh.admin.* ACE node to group.everyone or builtin.everyone. Doing so grants every player on your server access to administration features including bans, finances, and teleportation.