Package reference
Every engine-generic capability is a subpath of the single @s2script/sdk package; CS2 game types are the separate @s2script/cs2. Import the types at author time — the engine injects the runtime at load. Every module page below is generated from the shipped type definitions, so its exports and signatures stay in lockstep with what you actually import.
Platform
| Subpath | What it gives you |
|---|---|
@s2script/sdk/plugin | plugin(), PluginContext, Scope |
@s2script/sdk/entity | EntityRef, create/spawn/teleport/remove, I/O |
@s2script/sdk/timers | delay / nextTick / nextFrame / threadSleep |
@s2script/sdk/math | Vector, QAngle, forwardVector |
@s2script/sdk/console | Injected console |
@s2script/sdk/interfaces | Inter-plugin interface types |
@s2script/sdk/config | Typed config + raw file I/O |
@s2script/sdk/plugins | List / manage loaded plugins |
Players & world
| Subpath | What it gives you |
|---|---|
@s2script/sdk/events | Fire events, HookResult, GameEvent |
@s2script/sdk/clients | Slot-backed Client |
@s2script/sdk/damage | Damage pre-hooks |
@s2script/sdk/trace | Line / ray / hull traces |
@s2script/sdk/transmit | Per-client entity visibility |
@s2script/sdk/usercmd | OnPlayerRunCmd-equivalent |
@s2script/sdk/usermessages | Protobuf UserMessage builder |
@s2script/sdk/sound | Emit sounds + precache |
Admin & chat
| Subpath | What it gives you |
|---|---|
@s2script/sdk/commands | register / registerServer / registerAdmin |
@s2script/sdk/chat | Chat.toSlot / toAll |
@s2script/sdk/admin | Admin cache + ADMFLAG |
@s2script/sdk/bans | Ban cache helpers |
@s2script/sdk/server | Server.command, cvars, map validity |
@s2script/sdk/menu | Interactive menus |
@s2script/sdk/topmenu | Aggregated admin menu registry |
@s2script/sdk/votes | Chat-ballot votes |
@s2script/sdk/translations | SourceMod-style i18n |
Persistence & network
| Subpath | What it gives you |
|---|---|
@s2script/sdk/db | Async SQLite / SQL |
@s2script/sdk/cookies | Client preference cookies |
@s2script/sdk/http | Off-thread fetch |
@s2script/sdk/ws | Client WebSocket |
@s2script/sdk/net | Raw TCP / UDP sockets |
Game
| Package | What it gives you |
|---|---|
@s2script/cs2 | Player, Pawn, schema accessors, event overlay, CS2 sugar |
Game-specific facts stay in @s2script/cs2 (and future @s2script/<game>). Litmus test: would this still be true on another Source 2 game? If no → game package.