Repository navigation
Getting Started
There are three ways to use the project. Most people only need the first two.
Everything the dumper produces for the current build is served by cs2-sdk.com:
-
Browse it — every dataset has a tab,
Ctrl+Ksearches all of them, and you can bookmark items into collections and export them. See Website. -
Query it —
GET /api/offset/<name>,GET /api/pattern/<name>, orPOST /api/queryfor many names in one request. See API. -
Download it — every generated file is served verbatim under
/raw/:https://cs2-sdk.com/raw/cs2.hpp,/raw/offsets.json,/raw/patterns/patterns.json,/raw/schemas/client_dll.hpp, …GET /apilists them all.
The repository always carries the latest dump under include/. Add it as a submodule, put include/ on your include path and include the single amalgamation header:
git submodule add https://github.com/scros22/cs2-universal-offsets.git external/cs2-sdk#include <cs2.hpp> // external/cs2-sdk/include is on the include path
static_assert(CS2_BUILD == 14184, "regenerate the SDK for this CS2 build");
void heal(client::C_CSPlayerPawn* pawn) {
if (pawn->m_iHealth() < 100)
pawn->m_iHealth() = 100;
}cs2.hpp pulls in every per-module schema header, offsets.hpp, interfaces.hpp, buttons.hpp, protobufs.hpp, patterns.hpp and the entity helpers. If you only need part of it, include the individual headers listed in Output Layout; each one is self-contained apart from macros.hpp.
After a CS2 patch, git submodule update --remote external/cs2-sdk. Each generated header records the build it was dumped from (CS2_BUILD, ifc::CS2_BUILD, pb::CS2_BUILD, entity::CS2_BUILD), so a stale SDK can fail at compile time instead of at runtime.
Download cs2-sdk.exe from the latest release, or build it:
cargo build --release # Rust 2024 edition -> target/release/cs2-sdk.exeThe default memflow connector is memflow-native, which is why the tool is Windows-only out of the box. Any other memflow connector can be selected with --connector / --connector-args.
- Start CS2. For the fullest
weapons.jsonandentities.json, be in a match: those two catalogues are read from the entities that exist at dump time. - Open an elevated prompt (memflow needs administrator rights to open the process).
- Run:
.\cs2-sdk.exeThe SDK is written to .\include\. A full trace log is always written to include\cs2-sdk.log; -v / -vv / -vvv raise the terminal verbosity. The tool plays a short audio cue when a run finishes; --no-sound silences it.
| Flag | Default | Effect |
|---|---|---|
-o, --output <DIR> |
include |
Output root |
-p, --process-name <NAME> |
cs2.exe |
Process to attach to |
-c, --connector <NAME> |
memflow-native | memflow connector |
-a, --connector-args <ARGS> |
— | Arguments for the connector |
-i, --indent-size <N> |
4 |
Indentation of generated headers |
--skip-offsets |
off | Skip interfaces, globals and schemas |
--skip-patterns |
off | Skip the signature pass |
--no-sound |
off | No audio cue |
-v, -vv, -vvv
|
warn | Terminal log level (the file log is always trace) |
include/manifest.json tells you whether the run was complete: offsets_ok, signatures_ok, and signature_counts.found / .total.
It never writes to the game, injects anything or hooks anything: it opens the process for reading, walks it and exits. What you do with the output is your responsibility.
cs2-sdk.com · Releases · Issues · MIT