CS2 Admin

June 26, 2026 ยท View on GitHub

Downloads Last commit Open issues Closed issues Size GitHub Workflow Status

Metamod Admin plugin for CS2 with SM style configuration and SB++ support.

Shared maplist with cs2-rockthevote.

API

Other Metamod: Source plugins can access public methods found in ics2admin.h and forwards.h

#include <public/ics2admin.h>

// In AllPluginsLoaded or later:
ICS2Admin *admin = (ICS2Admin *)g_SMAPI->MetaFactory(
    CS2ADMIN_INTERFACE, nullptr, nullptr);

if (admin && admin->HasFlag(slot, CS2ADMIN_FLAG_BAN))
    // player can ban
#include <public/forwards.h>

ICS2AdminForwards *fwd = (ICS2AdminForwards *)g_SMAPI->MetaFactory(
    CS2ADMIN_FORWARDS_INTERFACE, nullptr, nullptr);

Installation

Requirements

How to

  1. Get the latest release for your operating system (linux/windows).
  2. Extract the contents of the release archive in your server's root folder /game/csgo/.
  3. Configure the main cfg in /game/csgo/cfg/cs2admin/core.cfg with database credentials and other preferences.
  4. Configure Admins in admins.cfg or admins.ini, Admin Groups in adming_groups.cfg and Admin overrides in admin_overrides.cfg (these can be directly copied from existing SM cfg with the same names)
  5. Create a new file called maplist.txt or rename the bundled maplist.example.txt file to it, then add your maps to the file.

The cs2admin plugin mirrors SourceMod's Admin configuration structure completely. This means the following articles are valid here too:

Usage

Commands

Chat Commands (in-game)

CommandUsagePermissionsDescription
!ban!ban <target> <time> [reason]d (Ban)Ban a connected player. Time in minutes (supports suffixes: h/d/w/m), 0 = permanent.
!unban!unban <steamid>e (Unban)Unban a player by SteamID.
!banip!banip <ip> <time> [reason]d (Ban)Ban an IP address. Time in minutes (supports suffixes: h/d/w/m), 0 = permanent.
!kick!kick <target> [reason]c (Kick)Kick a connected player from the server.
!slay!slay <target>f (Slay)Slay a player. Supports multi-target selectors (@all, @t, @ct, etc.).
!mute!mute <target> <time> [reason]j (Chat)Mute a player (block voice). Time in minutes (supports suffixes: h/d/w/m), 0 = permanent.
!unmute!unmute <target>j (Chat)Unmute a player.
!gag!gag <target> <time> [reason]j (Chat)Gag a player (block text chat). Time in minutes (supports suffixes: h/d/w/m), 0 = permanent.
!ungag!ungag <target>j (Chat)Ungag a player.
!silence!silence <target> <time> [reason]j (Chat)Silence a player (mute + gag). Time in minutes (supports suffixes: h/d/w/m), 0 = permanent.
!unsilence!unsilence <target>j (Chat)Unsilence a player (unmute + ungag).
!comms!comms [target]j (Chat)Show comm restriction status for a player (defaults to self).
!listbans!listbans <target>d (Ban)List active bans for a connected player.
!listcomms!listcomms <target>j (Chat)List active comm restrictions for a connected player.
!who!whob (Generic)List all online admins with their flags, group, and immunity level.
!listdc!listdcd (Ban)Show recently disconnected players (name, SteamID, IP, time ago).
!give!give <target> <weapon>n (Cheats)Give a weapon to player(s). Auto-prepends weapon_ if missing. Supports multi-target.
!strip!strip <target>n (Cheats)Strip all weapons from player(s). Supports multi-target selectors.
!rcon!rcon <command>m (RCON)Execute a server console command.
!map!map <mapname|workshopid>g (Changemap)Change the current map. Supports partial name match from maplist or raw workshop IDs.
!maps!maps [page]g (Changemap)List available maps from the maplist (paginated).
!pm!pm <target> <message>j (Chat)Private message a player. Echoes to all online admins.
!entfire!entfire <entity> <input> [value]n (Cheats)Fire an input on a map entity via ent_fire.
!report!report <target> <reason>NoneReport a player to online admins. Subject to cooldown.
!adminhelp!adminhelp [page]NoneList all available commands (paginated).
!find!find <text>NoneSearch commands by name.

Console / RCON Commands

CommandUsageDescription
mm_reloadmm_reloadReload config and admin cache, re-verify all connected players.
mm_rehashmm_rehashRebuild admin cache from database and flat files.
cs2admin_versioncs2admin_versionDisplay the loaded CS2Admin version.
sc_fw_blocksc_fw_block <authid> <time> <type> <reason>(Web panel RCON) Apply a mute (type 1) or gag (type 2) to a connected player.
sc_fw_unmutesc_fw_unmute <authid>(Web panel RCON) Unmute a connected player.
sc_fw_ungagsc_fw_ungag <authid>(Web panel RCON) Ungag a connected player.

Target Selectors

Commands that accept a <target> support the following selectors:

SelectorDescription
@meYourself
@allAll players
@tAll Terrorists
@ctAll Counter-Terrorists
@specAll Spectators
@deadAll dead players
@aliveAll alive players
@randomA random player
@botAll bots
@humanAll human players
$STEAM_0:X:XTarget by SteamID (Steam2, Steam3, or SteamID64)
&nameTarget by exact name
#slotTarget by player slot number
namePartial name match

Duration Suffixes

Time values for ban/mute/gag commands support optional suffixes:

SuffixMeaningExample
(none)Minutes (default)60 = 60 minutes
hHours2h = 2 hours
dDays7d = 7 days
wWeeks2w = 2 weeks
mMonths (30 days)1m = 30 days

Build

Prerequisites

  • This repository is cloned recursively (ie. has submodules)
  • python3
  • ambuild, make sure ambuild command is available via the PATH environment variable;
  • MSVC (VS build tools)/Clang installed for Windows/Linux.

AMBuild

mkdir -p build && cd build
python3 ../configure.py --enable-optimize
ambuild

Credits

Contributing

Feel free to create PRs or issues regarding anything, but this is very much just for fkz and I will not implement bloat like funcommands.