Source2Toolkit

Introduction

Source2Toolkit is a server-side development toolkit for Counter-Strike 2, built on top of MetaMod:Source.

It provides a powerful scripting and extension layer that enables developers to build plugins ranging from simple gameplay tweaks to advanced engine-level modifications.


Why should you choose Source2Toolkit?

Source2Toolkit is designed with engine-level access and performance in mind. It combines low-level control with high-level utilities, allowing you to work directly with Source 2 internals while still keeping development efficient.

The toolkit focuses on:

  • Direct interaction with the game’s memory and schema system
  • Minimal overhead and near-native execution
  • Clean and modern API design for plugin development
  • Flexibility without artificial limitations

A list of features:

Engine access

  • Schema System: Access Source 2 SDK classes, offsets and fields through schema.
  • Entity System: Work with entities using schema-based access and native structures.
  • Hooks: KHook — virtual, vtable and function detours on the one engine Metamod runs, with pattern scanning support.
  • Memory: Direct memory access and manipulation for advanced use cases.
  • Addresses: Resolved engine functions — spawn, take damage, set model, set pawn and more — ready to call.
  • Game Systems: Find and register IGameSystem implementations on the engine's factory list.
  • GameConfig: Signature and offset management system for cross-version compatibility.
  • Dynamic Libraries: Load and interact with external modules and engine interfaces.

Gameplay

  • Commands: Register and handle console or chat commands with full control over execution.
  • ConVars: Access, modify and replicate console variables across clients.
  • Events: Hook engine and game-level events with pre/post execution control.
  • GameEvents: Fully typed game event system for safe and predictable handling.
  • Network Messages: Allocate, send and hook Source 2 net messages by ID or by name.
  • Menus: Build chat menus with options, titles and per-player state.
  • Custom HUD: Hook click callbacks on custom HUD layout entities.
  • Scheduler: Timers and next-frame execution utilities.
  • Tracing: Built-in trace utilities for raycasts and collision queries.

Services

  • HTTP: Asynchronous requests through Steam's HTTP client, with availability and queue reporting.
  • JSON: Parse and build JSON values without pulling in a dependency of your own.
  • MySQL: Query the database and walk typed result sets by column name or index.
  • Paths: Resolved paths for the game, the toolkit root, configs, gamedata and plugins.

Source2Toolkit is an open-source project, designed to give developers full control over their server environment without unnecessary restrictions.

On this page