Package reference

Package reference

Every capability is a separate @s2script/<name> package. Import the types at author time; the engine injects the runtime at load. Browse live module pages from the catalog.

Core platform

PackageWhat it gives you
@s2script/entityEntityRef, create/spawn/teleport/remove, I/O
@s2script/frameOnGameFrame
@s2script/timersdelay / nextTick / nextFrame / threadSleep
@s2script/mathVector, QAngle, forwardVector
@s2script/consoleInjected console
@s2script/interfacespublishInterface / consumer proxies
@s2script/configTyped config + raw file I/O
@s2script/pluginsList loaded plugins

Players & world

PackageWhat it gives you
@s2script/clientsSlot-backed Client + lifecycle events
@s2script/eventsGame events, pre-hooks, fire
@s2script/damageDamage.onPre
@s2script/traceLine / ray / hull traces
@s2script/usermessagesProtobuf UserMessage builder
@s2script/cs2Player, Pawn, GameRules, CS2 sugar

Admin & chat

PackageWhat it gives you
@s2script/commandsregister / registerAdmin / chat triggers
@s2script/chatChat.toSlot / toAll / onMessage
@s2script/adminAdmin cache + ADMFLAG
@s2script/bansBan cache helpers
@s2script/serverServer.command, cvars, onMapStart
@s2script/menuInteractive menus
@s2script/topmenuAggregated admin menu registry
@s2script/votesChat-ballot votes

Persistence & network

PackageWhat it gives you
@s2script/dbAsync SQLite
@s2script/cookiesClient preference cookies
@s2script/httpOff-thread fetch
@s2script/wsClient WebSocket

Plugin-published

PackageWhat it gives you
@s2script/zonesZone CRUD + enter/leave/stay events (published by the zones plugin)

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