SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Source-checked★ FeaturedLibraries & compatibility

CounterStrikeSharp

by roflmuffin · for Counter-Strike 2

CounterStrikeSharp allows you to write server plugins in C# for Counter-Strike 2/Source2/CS2

116KDownloads
26d agoLast updated
OtherLicense
GitHubSource

About CounterStrikeSharp

From GitHub

CounterStrikeSharp allows you to write server plugins in C# for Counter-Strike 2/Source2/CS2

Table of Contents ↗️

CounterStrikeSharp


CounterStrikeSharp is a server side modding framework for Counter-Strike 2. This project implements a .NET 8 scripting layer on top of a Metamod Source Plugin, allowing developers to create plugins that interact with the game server in a modern language (C#) to facilitate the creation of maintainable and testable code.

Come and join our Discord

Install

Download the latest build from here. (Download the with runtime version if this is your first time installing).

Detailed installation instructions can be found in the docs.

What works?

These features are the core of the platform and work pretty well/have a low risk of causing issues.

  • [x] Console Commands, Server Commands (e.g. css_mycommand)
  • [x] Chat Commands with ! and / prefixes (e.g. !mycommand)
  • [x] Fake Console Variables (commands which mimic ConVar behaviour as these have not been fully reverse engineered)
  • [x] Game Event Handlers & Firing of Events (e.g. player_death)
  • [x] Basic event value get/set (string, bool, int32, float)
  • [x] Complex event values get/set (ehandle, pawn, player controller)
  • [x] Game Tick Based Timers (e.g. repeating map timers)
  • [x] Timer Flags (REPEAT, STOP_ON_MAPCHANGE)
  • [x] Listeners (e.g. client connected, disconnected, map start etc.)
  • [x] Client Listeners (e.g. connect, disconnect, put in server)
  • [x] OnMapStart
  • [x] OnTick
  • [x] Server Information (current map, game time)
  • [x] Schema System Access (access player values like current weapon, money, location etc.)

Links

Examples

You can view the example Warcraft plugin migrated from the previous VSP.NET project to give you an idea of the kind of power this scripting runtime is capable of. This plugin shows how you can hook events, create commands, use third party libraries (SQLite) and do basic entity manipulation.

Basic Example with Game Event & Console Commands

using CounterStrikeSharp.API.Core;

namespace HelloWorldPlugin;

public class HelloWorldPlugin : BasePlugin
{
    public override string ModuleName => "Hello World Plugin";

    public override string ModuleVersion => "0.0.1";

    public override string ModuleAuthor => "roflmuffin";

    public override string ModuleDescription => "Simple hello world plugin";

    public override void Load(bool hotReload)
    {
        Logger.LogInformation("Plugin loaded successfully!");
    }

    [GameEventHandler]
    public HookResult OnPlayerConnect(EventPlayerConnect @event, GameEventInfo info)
    {
        // Userid will give you a reference to a CCSPlayerController class
        Logger.LogInformation("Player {Name} has connected!", @event.Userid.PlayerName);

        return HookResult.Continue;
    }

    [ConsoleCommand("css_issue_warning", "Issue warning to player")]
    public void OnCommand(CCSPlayerController? player, CommandInfo command)
    {
        Logger.LogWarning("Player shouldn't be doing that");
    }
}

Credits

A lot of code has been borrowed from SourceMod as well as Source.Python, two pioneering source engine plugin frameworks which this project lends a lot of its credit to. I've also used the scripting context & native system that is implemented in FiveM for GTA5. Also shoutout to the CS2Fixes project for providing good reverse-engineering information so shortly after CS2 release.

How to Build

Building requires CMake.

Clone the repository

git clone https://github.com/roflmuffin/counterstrikesharp

Init and update submodules

git submodule update --init --recursive

Make build folder

mkdir build
cd build

Generate CMake Build Files

cmake ..

Build

cmake --build . --config Debug

License


CounterStrikeSharp is licensed under the GNU General Public License version 3. A special exemption is outlined regarding published plugins, which you can find in the LICENSE file.

Highlights

From source data

Footprint

Rated a light load on a server.

License

Published under Other.

Last update

Its author last shipped an update 26d ago.

CounterStrikeSharp on Nxeon

From our catalogue
One-click install
Supported on Nxeon Counter-Strike 2 servers. We download it from GitHub, place it, and restart the server.
Server side
Required on the server
Server load
light
Smallest plan we suggest
CS2 — 2 GB (2 GB RAM). This follows our own load rating above, not a benchmark.
Latest build
v1.0.378, released 2026-10-23

Recent builds

BuildReleasedGame versionsLoaders
v1.0.3782026-10-23n/an/a
v1.0.3772026-10-19n/an/a
v1.0.3762026-09-27n/an/a
v1.0.3752026-09-24n/an/a
v1.0.3742026-09-07n/an/a
v1.0.3732026-08-25n/an/a

Run CounterStrikeSharp on a Counter-Strike 2 server

Pick a server or deploy a new one above; it is installed in one click.

What kind of mod it is

From the catalog
Listed on GitHub as “Core”

Libraries & compatibility

Foundations and fixes other mods build on. Usually installed because something else needs it.

Runs on your server

From source side support

GitHub lists CounterStrikeSharp as required on the server. Check its GitHub page to see whether players need it too.

Compatibility

Game
Counter-Strike 2
Runs on
Serverrequired on the server

Verified at the source

  • ✓GitHubOfficial listing, checked 2026-10-26Open ↗
  • ✓Authorroflmuffin, as published on GitHub
  • ✓LicenseOtherFree

CounterStrikeSharp, answered

Generated from the mod’s own source data.

Do my players need to install CounterStrikeSharp?

GitHub lists CounterStrikeSharp as required on the server. Check its GitHub page to see whether players need it too.

Is it free?

Yes. CounterStrikeSharp is free to download from GitHub. Its license is Other.

How do I add it to my Nxeon server?

Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

NxLabs

Run CounterStrikeSharp on a Counter-Strike 2 server.

Deploy in about a minute from $6.99 a month, then add CounterStrikeSharp in one click.