Search docs
Search modules and symbols
Package reference

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

SubpathWhat it gives you
@s2script/sdk/pluginhook (game-event catalog), previous, publish / use, onOutput, createScope, Scope
@s2script/sdk/entityEntityRef, create/spawn/teleport/remove, I/O
@s2script/sdk/timersdelay / nextTick / nextFrame / threadSleep
@s2script/sdk/mathVector, QAngle, forwardVector
@s2script/sdk/consoleInjected console
@s2script/sdk/interfacesInter-plugin interface types
@s2script/sdk/configTyped config, live onChange, and raw file I/O
@s2script/sdk/pluginsList / manage loaded plugins
@s2script/sdk/unsafePlugin-declared engine calls and inbound hooks — guide

Players & world

SubpathWhat it gives you
@s2script/sdk/eventsFire events, HookResult, GameEvent — subscribe with hook.on / hook.onPre
@s2script/sdk/clientsSlot-backed Client
@s2script/sdk/damageBlock-scoped DamageInfo (OnTakeDamage public and SDKHook)
@s2script/sdk/sdkhooksSDKHook / SDKUnhook / SDKHookType / UseType (OnTakeDamage, SetTransmit, lifecycle virtuals) — guide
@s2script/sdk/traceLine / ray / hull traces
@s2script/sdk/transmitPer-client entity visibility (Transmit.setVisibleTo; AND-merges with SetTransmit)
@s2script/sdk/usercmdUserCmdView for OnPlayerRunCmd
@s2script/sdk/usermessagesProtobuf UserMessage builder
@s2script/sdk/soundEmit sounds + precache

Admin & chat

SubpathWhat it gives you
@s2script/sdk/commandscommand / command.admin / command.server; Command alias for CommandInvocation
@s2script/sdk/chatChat.toSlot / toAll
@s2script/sdk/adminAdmin cache + ADMFLAG
@s2script/sdk/bansBan cache helpers
@s2script/sdk/serverServer.command, cvars, map validity
@s2script/sdk/menuInteractive menus
@s2script/sdk/topmenuAggregated admin menu registry
@s2script/sdk/votesChat-ballot votes
@s2script/sdk/translationsSourceMod-style i18n — guide

Persistence & network

SubpathWhat it gives you
@s2script/sdk/dbAsync SQLite / SQL
@s2script/sdk/cookiesClient preference cookies
@s2script/sdk/httpOff-thread fetch
@s2script/sdk/wsClient WebSocket
@s2script/sdk/netRaw TCP / UDP sockets

Game

PackageWhat it gives you
@s2script/cs2Player, 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.

s2script — Source 2 plugin framework

GitHub