Skip to content

mrc4tt/CounterStrikeSharp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

966 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents ↗️

CounterStrikeSharp - Forked

downloads

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.

Forked version by Miksen for own servers

  • Added support for Debian 13 & Ubuntu 24.04
  • Added support for CommandLine API (GetCommandLineString) CommandLine.GetCommandLineString
  • (Don't use this version if you don't like it.)

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

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.

About

CounterStrikeSharp (Forked by Miksen)

Resources

License

Contributing

Stars

Watchers

Forks

Contributors

Languages

  • C# 57.7%
  • C++ 41.1%
  • Shell 0.4%
  • C 0.3%
  • CMake 0.3%
  • TypeScript 0.2%