C++ and SourcePawn
Two languages, one API. Native plugins and SourcePawn scripts load side by side as .smx files, the script API mirrors the C++ one name for name, and C++ plugins can hand scripts natives of their own.
Source 2 · C++ · SourcePawn
A plugin platform for Counter-Strike 2 that keeps you at engine level. Schema-based entities, game hooks, KHook detours and native events — in C++ or SourcePawn, on one API, with nothing between your code and the game.
01 — Capabilities
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.
Two languages, one API. Native plugins and SourcePawn scripts load side by side as .smx files, the script API mirrors the C++ one name for name, and C++ plugins can hand scripts natives of their own.
Entities, offsets and fields resolved through the schema the game itself ships — not through headers that rot on the next update.
TakeDamage, CanAcquire, PostThink, movement, jumps — about 35 game functions the core hooks from its own gamedata. A handler and a context, no signature of your own, and a plugin that survives an engine update with a core update.
Virtual, vtable and function detours on the one KHook engine Metamod runs, so the core, every plugin and Metamod itself compose correctly — for everything the game hooks do not cover.
Console and chat commands, listeners on commands the game already owns, typed ConVar refs with replication.
A fully typed game event system on top of engine-level events, hooked pre or post with the usual KHook::Action vocabulary.
Raw pointers, module handles, GameConfig signatures and resolved engine functions like spawn, set model and take damage.
Timers, next-frame execution, and ray and collision trace utilities shipped with Source2Mod.
Chat menus with options, titles and per-player state, plus click callbacks on custom HUD layout entities.
Allocate, send and hook Source 2 net messages by numeric ID or by partial name — protobuf included.
Sound events sent to exactly the players you pick, stopped or re-parametrised by guid, per-player volume channels, and a hook on every sound the game sends.
Per-viewer entity visibility: hide players and entities from some clients and not others, owner-following, and a CheckTransmit hook for the rest.
Players by slot, SteamID or name, kick and auth checks, and command targets like @all, @ct or #userid with immunity — the same calls from C++ and SourcePawn.
Phrase files per plugin, and every player reads your messages in their own language — formatted per recipient, from C++ or a script.
Per-player settings that persist between visits, a player's country from MaxMind, the map cycle and the next map.
Scripts share natives and forwards with each other and with C++ plugins; raw hooks described at runtime reach what the API does not cover.
Async requests through Steam, a JSON value API, and MySQL or SQLite with typed result sets, so you do not vendor three libraries first.
02 — Documentation
Guides for every subsystem, a reference generated from the SDK headers, and the full schema of the game — each with a sidebar of its own.
03 — In practice
Controllers, pawns and schema fields are generated from the game itself. Read and write them exactly like native code — with or without automatic SetStateChanged.
04 — Quickstart
Source2Mod loads through MetaMod. Drop it into /game/csgo/ and register it in gameinfo.gi.
Game csgo/addons/metamodExtract the release and copy the /addons directory into your server /game/csgo/ folder.
/game/csgo/addons/source2modRestart the server, confirm Source2Mod and your plugins are loaded, then write against the API in C++ or SourcePawn.
s2m listOpen source, actively developed, and built by people running real servers.