RE:NODE
Browse hosting

Guides11 min read

CS2 plugins: Metamod:Source and CounterStrikeSharp

Why SourceMod does not run on CS2, how to install Metamod:Source and CounterStrikeSharp, set up admins and flags, and survive a game update.

0 readers

The first thing to know about Counter-Strike 2 plugins is the thing that stops most people on day one: SourceMod does not work. Ten years of SourcePawn plugins, every .smx you ever downloaded, the admin menu you know by heart - none of it runs on Source 2. CS2's plugin stack is Metamod:Source in its Source 2 line, and on top of that CounterStrikeSharp, which hosts plugins written in C# against .NET. The ecosystem is younger, smaller and rebuilt from scratch, and it is where every serious CS2 community server now lives.

This post is the install, the admin configuration, the plugins that are worth the disk, and the part nobody writes down: what breaks when Valve ships an update, and how to be back online in ten minutes rather than a weekend.

What runs on CS2, and what does not#

ThingStatus on CS2
Metamod:Source, 2.x lineWorks. This is the foundation
Metamod:Source 1.11 / 1.12Source 1 only. Wrong engine
SourceMod and .smx pluginsDoes not run. No Source 2 support
CounterStrikeSharpWorks. C# plugins on .NET 8
CS2Fixes and other native Metamod pluginsWork, written in C++ against Metamod directly
Valve server plugin interface (plugin_load)Not a practical route on Source 2

Two consequences. First, if a guide tells you to drop something into addons/sourcemod/plugins, it is a CS:GO guide and the rest of it is wrong too. Second, when you look for a plugin that does something specific, you are looking at GitHub releases rather than a plugin directory - there is no package manager, no in-panel installer, and no curated index. You download a zip, you read who wrote it, and you unpack it yourself.

A plugin runs as native code inside the server process with no sandbox. It can read every file the server can read, open sockets, and run for as long as it likes inside a game tick. Treat installing one the way you would treat running a script as root, because that is the actual privilege level. Keeping a modded server clean is the general version of this argument.

read at startupscans plugins/CS2 serverSource 2gameinfo.giadds a search pathMetamod:Sourceaddons/metamodcounterstrikesharp.vdfMetamod loads itCounterStrikeSharp.NET 8 hostYour pluginMatchZy.dll
How a C# plugin ends up inside CS2

Installing Metamod:Source#

Metamod is a loader. On its own it changes nothing about the game; it gives other code a supported way to sit between the engine and the game module.

  1. Get a Metamod:Source build from the 2.x development line on the AlliedModders site. The stable 1.x downloads are for Source 1 games and will not load. Take the Linux package if your server is Linux, which on a panel host it is.
  2. Unpack it so that the archive's addons folder lands in game/csgo/. You should end up with game/csgo/addons/metamod/ containing metaplugins.ini and a bin folder.
  3. Edit game/csgo/gameinfo.gi. Find the SearchPaths block and add one line above the existing Game csgo entry:
game/csgo/gameinfo.gi
		SearchPaths		{			Game_LowViolence	csgo_lv			Game	csgo/addons/metamod			Game	csgo			Game	core
  1. Restart the server and type meta version in the console.

The gameinfo.gi edit is the whole trick, and it is also the single most common reason a working server stops loading plugins. That file belongs to the game, so a validate run or a large update replaces it and your line disappears. Nothing errors; Metamod simply is not there any more, plugins do not load, and the server looks fine. If plugins vanish after an update, check gameinfo.gi before you check anything else.

code
] meta listListing 1 plugin:  [01] CounterStrikeSharp (1.0.xxx) by roflmuffin

meta list is the proof that Metamod loaded and the list of what it loaded. An empty list with a version banner means Metamod is running and has nothing to load. No response at all means gameinfo.gi is wrong or the build is the Source 1 one.

Installing CounterStrikeSharp#

CounterStrikeSharp is a Metamod plugin that hosts a .NET runtime and exposes the game to C#. Its releases come in two shapes: one that bundles the .NET runtime and one that expects .NET 8 to be installed on the machine. On a container-based host take the bundled build - you do not control what is installed on the node, and the bundled build is a few hundred megabytes of disk rather than a support ticket.

  1. Unpack the release into game/csgo/ so addons/counterstrikesharp/ appears next to addons/metamod/.
  2. Confirm addons/metamod/counterstrikesharp.vdf exists. That file is what tells Metamod to load it.
  3. Restart. meta list should now show CounterStrikeSharp, and css_plugins list should answer.

The tree you are aiming for:

code
game/csgo/addons/  metamod/    metaplugins.ini    counterstrikesharp.vdf  counterstrikesharp/    bin/    configs/      core.json      admins.json      admin_groups.json    gamedata/    logs/    plugins/      MatchZy/        MatchZy.dll

Plugins live one folder deep, and the folder name must match the DLL name: plugins/MatchZy/MatchZy.dll loads, plugins/MatchZy.dll does not. That rule catches almost everybody once.

configs/core.json is worth reading in full, because it is short and three of its settings change behaviour you will otherwise spend an hour chasing. The chat triggers decide which prefix runs a command in chat - ! for a visible command and / for a silent one by default. Hot reload decides whether dropping a new DLL in place reloads it without a restart, which is convenient on a test server and a bad idea on a live one. And there is a switch for following Valve's community server guidelines, which restricts the plugin API from doing things that get servers in trouble; leaving it on is the default for a reason, covered below.

Admins, groups and flags#

Admins are a JSON file, not a console command. configs/admins.json maps a Steam id to a set of flags:

addons/counterstrikesharp/configs/admins.json
{  "Anna": {    "identity": "76561198012345678",    "flags": ["@css/generic", "@css/kick", "@css/ban", "@css/changemap"],    "immunity": 80  },  "Moderator Jan": {    "identity": "76561198087654321",    "groups": ["#css/moderator"],    "immunity": 40  }}
addons/counterstrikesharp/configs/admin_groups.json
{  "#css/moderator": {    "flags": ["@css/generic", "@css/kick", "@css/chat"],    "immunity": 40  }}
FlagGrants
@css/rootEverything, including flags added by future plugins
@css/genericThe baseline "is an admin" check most plugins start with
@css/kickKick
@css/ban / @css/unbanBan and lift bans
@css/slaySlay, slap and similar
@css/changemapChange the map
@css/cvarChange cvars from chat
@css/chatGag, mute, admin chat
@css/voteStart votes
@css/reservationReserved slot access
@css/cheatsToggle sv_cheats where a plugin allows it

immunity is a number, and a higher number cannot be acted on by a lower one. Give yourself 100, give trusted moderators 50, and give the person who asked nicely 10. Without immunity values two admins can kick each other in a loop, which is funny exactly once.

css_admins_reload re-reads both files without restarting, so adding a moderator during an evening costs nothing. Use @css/root for one account, yours, and build everyone else out of specific flags. The identity field is the 17-digit SteamID64; status in the console prints each connected player's id in the form you need.

Plugins worth running#

PluginWhat it doesNeeds
MatchZy5v5 matches: ready-up, knife round, pauses, per-map demos, round restoreCounterStrikeSharp
CS2-SimpleAdminBans, mutes, gags and slays backed by a database, shared across serversCounterStrikeSharp, a database
cs2-retakesRetakes mode with bombsite spawns and weapon allocationCounterStrikeSharp
CS2FixesEngine-level fixes and admin commands, the base for Zombie Escape serversMetamod only

That list is deliberately short. A CS2 community server needs an admin plugin, a way to vote for the next map, and one plugin for whatever the server is actually for. Everything past that is weight you have to re-test after every game update.

Two categories deserve a warning rather than a recommendation. Anything that changes weapon skins, gives inventory items or fakes cosmetics is against Valve's server guidelines, and the punishment is a ban on the game server login token - which takes the server with it, and can follow the Steam account to the next token. Skin plugins are popular and they are a genuine risk to your token, not a theoretical one. And anything advertising "anti-cheat" for CS2 is doing heuristics from inside the server process; some of it is useful, none of it is VAC, and all of it produces false positives you will have to arbitrate.

For a match server, MatchZy alone covers the whole evening, and a CS2 competitive match server walks through configuring it.

Installing, configuring and reloading a plugin#

The install is always the same shape. Download the release zip, open it to check it contains an addons/ path or a plain plugin folder, and unpack it into the right place with the file manager or over SFTP - SFTP and the file manager has the connection details. Then:

code
css_plugins listcss_plugins load MatchZycss_plugins unload MatchZycss_plugins reload MatchZy

Most plugins generate their configuration on first load rather than shipping it, so the sequence is: install, start, stop, then edit the file that appeared. Some write to addons/counterstrikesharp/configs/plugins/<Name>/, some write a .cfg into game/csgo/cfg/, and the plugin's own readme is the only authority on which. If a plugin has settings you cannot find, start the server once and look at what changed on disk.

Plugin errors go to addons/counterstrikesharp/logs/, one file per day, and they are far more readable than the console because a C# stack trace in a game console wraps into porridge. When a plugin loads but does nothing, the log usually has one line saying why, and it is usually a missing dependency or a gamedata signature that no longer matches.

Surviving a CS2 update#

Valve updates CS2 without warning and without regard for your plugins. Three things break, in this order of likelihood:

  1. gameinfo.gi is reset, so Metamod is not loaded at all. Re-add the line.
  2. Metamod or CounterStrikeSharp needs a new build, because internal offsets moved. Nothing you own can fix this; you wait for the release, which is usually hours rather than days.
  3. A plugin's gamedata no longer matches, so it loads and then throws when it touches the game. Update the plugin, or its gamedata file if the author ships one separately.

The defence is procedural, not technical. Keep a copy of the whole addons folder and your gameinfo.gi somewhere that is not the server, so a restore is a file copy. Do not run a game update an hour before a match - update the day after, on purpose, with time to fix it. And if you run anything that matters, have a second, cheap server you update first. What to do when a mod update breaks is the general procedure; CS2 is just an unusually fast-moving instance of it.

On RE:NODE the update runs when the server starts, so the decision of when to take an update is the decision of when to restart - and the Schedules tab is where you put that at 05:00 on a Tuesday instead of five minutes before a match. Backup slots are included on every CS2 plan, and the sensible habit is a manual backup before you install any plugin, because rolling back is then one button rather than an archaeology session.

Memory, CPU and what plugins actually cost#

A vanilla CS2 server for ten players is comfortable in 1 GB. CounterStrikeSharp brings a .NET runtime into the process and a handful of plugins on top of that, and the realistic floor for a plugin server is 2 GB - not because the plugins are heavy but because the runtime has a working set and the garbage collector likes headroom. If the container hits its memory limit it is stopped and restarted clean rather than left to swap, which on a match night is the worst possible outcome, so size up rather than sail close.

CPU is the more interesting constraint. A plugin that runs work on every tick runs it 64 or 128 times a second, per player, forever. Most published plugins are careful; the one somebody wrote for your server in an afternoon may not be. If the server starts to stutter after you install something, unload it and watch the graph rather than reasoning about it - the panel's CPU graph against your hard limit is the fastest test you have, and one container per server means nothing else is causing it.

Troubleshooting#

`meta list` prints nothing. Metamod is not loading. Check the gameinfo.gi line, check you unpacked the Source 2 build, and check the file path is game/csgo/addons/metamod and not csgo/addons/metamod.

Metamod loads but CounterStrikeSharp does not appear. addons/metamod/counterstrikesharp.vdf is missing, or you took the build without the bundled runtime onto a machine with no .NET 8.

`css_plugins list` shows a plugin but its commands do nothing. Nearly always admin flags. Check admins.json has your SteamID64, run css_admins_reload, and check the chat trigger in core.json matches what you are typing.

Everything worked yesterday and nothing works today. A CS2 update. Start with gameinfo.gi.

The server crashes on map change. Unload plugins one at a time and change maps between each. Map change is when most plugin bugs surface, because it is when the game tears down and rebuilds state that a plugin may still be holding.

Chat commands print in chat for everyone. That is the public trigger doing its job. Use the silent trigger, / by default, for admin commands.

FAQ#

Does SourceMod work on CS2?

No. SourceMod supports Source 1 games such as Team Fortress 2, Counter-Strike: Source and CS:GO. CS2 runs on Source 2, which SourceMod has no support for, and there is no converter for SourcePawn plugins. CounterStrikeSharp is the replacement in practice.

Do plugins get my server VAC banned?

VAC bans clients, not servers. The risk for a server is a ban on its game server login token, which Valve issues for breaking the community server guidelines - handing out inventory items, faking skins, or misrepresenting what the server is. Ordinary admin, match and game mode plugins are not the problem.

Can I install plugins from the panel without SSH?

Yes. Everything here is files in game/csgo/, so the file manager or SFTP is enough. Archives can be unpacked in place, and the editor will open gameinfo.gi and the JSON configs directly.

Where do I put admins for CS2?

addons/counterstrikesharp/configs/admins.json, keyed by name, with a SteamID64 in identity and a list of @css/ flags. Reload it live with css_admins_reload.

How much memory does CounterStrikeSharp add?

Enough that 1 GB stops being comfortable. Budget 2 GB for a server running CounterStrikeSharp and a few plugins, and more if one of them keeps state for every player.

Why did my plugins stop loading after an update?

Because the update rewrote game/csgo/gameinfo.gi and removed the Metamod search path. Add the line back and restart. If that is not it, Metamod or CounterStrikeSharp needs a build that matches the new game version.


Comments

Completely anonymous: no account, no email, no cookie. We store the name you type, the text and the time - nothing else. Links are limited and markup is not rendered.

0/2000