How to Install Metamod and CounterStrikeSharp on a CS2 Server
CS2 has no SourceMod, so most plugin servers use Metamod:Source together with CounterStrikeSharp, a framework that runs plugins written for it. These steps give you the overall idea. Always follow the current instructions from each project, because file layouts change.
What you need
- The latest Metamod:Source build made for CS2 (a development build, since CS2 support is newer).
- The CounterStrikeSharp release that includes the runtime, often labelled with runtime in its name.
Install steps
- Stop the server.
- In the Files tab, open the game/csgo folder.
- Upload and extract Metamod so that an addons folder exists in game/csgo.
- Open game/csgo/gameinfo.gi and add a line pointing to Metamod in the search paths section, placed above the other Game lines. The Metamod instructions show the exact line, which refers to csgo/addons/metamod.
- Upload and extract CounterStrikeSharp into the same addons area.
- Start the server and type meta list in the Console tab. Metamod should list CounterStrikeSharp.
Adding plugins
Plugins go in the counterstrikesharp plugins folder, each in its own subfolder with its DLL. You can use the css_plugins command to list loaded plugins. Configuration files live under the counterstrikesharp configs folder.
Admins
CounterStrikeSharp keeps an admin list in a JSON file in its configs folder, where you add a player SteamID64 and flags. Check the project documentation for the exact format.
After a CS2 update
Game updates can overwrite gameinfo.gi, which removes the Metamod line. If plugins stop loading after an update, reopen the file and add the line again. Also check that Metamod and CounterStrikeSharp have newer builds, as a game update can break older ones.
Tips
- Install one plugin at a time and test.
- Keep a backup of gameinfo.gi with your edit.
- Only use plugins from sources you trust, since they run code on your server.
- Read the plugin page for required dependencies.