Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

CounterStrikeSharp

> 编程语言
Open source

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

1.3K stars0 likes2 views
WebsiteGitHub

About

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

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.

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

Links

  • Join the Discord: Ask questions, provide suggestions
  • Read the docs: Getting started guide, hello world plugin example
  • Issue tracker: Raise any issues here
  • Builds: Download latest unstable dev snapshot
  • Install Docs: Installation instructions
  • Example Plugin: Test plugin with basic functionality

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

…

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

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

Init and update submodules

bash
git submodule update --init --recursive

Make build folder

bash
mkdir build
cd build

Generate CMake Build Files

bash
cmake ..

Build

bash
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.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#counter-strike-2cs2metamod-sourcesource2

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言