Source2Toolkit

Source 2 · C++ · Server side

Direct access
to Source 2.
No compromises.

A plugin framework for Counter-Strike 2 that keeps you at engine level. Schema-based entities, KHook detours and native events — in C++, with nothing between your code and the game.

Language
C++
Runs on
MetaMod:Source
Target
Counter-Strike 2
Overhead
Near-native
hello_world.cpp
highlighting
schema systeminline hooksvirtual hookspattern scanninggame eventsnet messagesconvarschat menuscustom hudschedulertracinggameconfigmemory accesshttp & jsonmysqldynamic libraries
schema systeminline hooksvirtual hookspattern scanninggame eventsnet messagesconvarschat menuscustom hudschedulertracinggameconfigmemory accesshttp & jsonmysqldynamic libraries

01 — Capabilities

Built for engine-level development, not scripting

Every subsystem is a thin, deliberate layer over the engine, and all of them ship in the box. Use the high-level API where it saves you time, and drop straight to memory where it does not.

01

Schema system

Entities, offsets and fields resolved through the schema the game itself ships — not through headers that rot on the next update.

02

Hooks on KHook

Virtual, vtable and function detours on the one KHook engine Metamod runs, so the core, every plugin and Metamod itself compose correctly.

03

Commands & ConVars

Console and chat commands, listeners on commands the game already owns, typed ConVar refs with replication.

04

Events & GameEvents

A fully typed game event system on top of engine-level events, hooked pre or post with the usual KHook::Action vocabulary.

05

Memory & addresses

Raw pointers, module handles, GameConfig signatures and resolved engine functions like spawn, set model and take damage.

06

Scheduler & tracing

Timers, next-frame execution, and ray and collision trace utilities shipped with the toolkit.

07

Menus & custom HUD

Chat menus with options, titles and per-player state, plus click callbacks on custom HUD layout entities.

08

Network messages

Allocate, send and hook Source 2 net messages by numeric ID or by partial name — protobuf included.

09

HTTP, JSON & MySQL

Async requests through Steam, a JSON value API and typed MySQL result sets, so you do not vendor three libraries first.

02 — In practice

The same API you would have written yourself

Browse the full API

Work like you are inside the engine

Controllers, pawns and schema fields are generated from the game itself. Read and write them exactly like native code — with or without automatic SetStateChanged.

  • Schema-based access
  • Automatic networking
  • Zero wrappers
entities.cpp
highlighting

03 — Quickstart

Three steps to a loaded plugin

  1. 01

    Install MetaMod:Source

    Source2Toolkit loads through MetaMod. Drop it into /game/csgo/ and register it in gameinfo.gi.

    Game csgo/addons/metamod
  2. 02

    Drop in the toolkit

    Extract the release and copy the /addons directory into your server /game/csgo/ folder.

    /game/csgo/addons/source2toolkit
  3. 03

    Verify and build

    Restart the server, confirm the plugin is loaded, then start writing against the API.

    meta list
Full installation guide

Stop fighting the engine. Start using it.

Open source, actively developed, and built by people running real servers.

Source2Toolkit — built by Slynx

Not affiliated with Valve Corporation.