Package reference
Every engine-generic capability is a subpath of the single @s2script/sdk package; CS2 game types are the separate @s2script/cs2. Prefer the root @s2script/sdk barrel for authoring. 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 | hook (game-event catalog), previous, publish / use, onOutput, createScope, 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, live onChange, and raw file I/O |
@s2script/sdk/plugins | List / manage loaded plugins |
@s2script/sdk/unsafe | Plugin-declared engine calls and inbound hooks — guide |
Players & world
| Subpath | What it gives you |
|---|---|
@s2script/sdk/events | Fire events, HookResult, GameEvent — subscribe with hook.on / hook.onPre |
@s2script/sdk/clients | Slot-backed Client |
@s2script/sdk/damage | Block-scoped DamageInfo (OnTakeDamage public and SDKHook) |
@s2script/sdk/sdkhooks | SDKHook / SDKUnhook / SDKHookType / UseType (OnTakeDamage, SetTransmit, lifecycle virtuals) — guide |
@s2script/sdk/trace | Line / ray / hull traces |
@s2script/sdk/transmit | Per-client entity visibility (Transmit.setVisibleTo; AND-merges with SetTransmit) |
@s2script/sdk/usercmd | UserCmdView for OnPlayerRunCmd |
@s2script/sdk/usermessages | Protobuf UserMessage builder |
@s2script/sdk/sound | Emit sounds + precache |
Admin & chat
| Subpath | What it gives you |
|---|---|
@s2script/sdk/commands | command / command.admin / command.server; Command alias for CommandInvocation |
@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 — guide |
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, Fade/Shake/HintText |
ui (HUD) | Custom Panorama HUD — concept guide |
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.