Search docs
Search guides, modules and symbols
Getting started

Getting started

s2script is a TypeScript plugin runtime for Source 2 games (Counter-Strike 2 first), loaded via Metamod:Source. The live runtime is CS2 on linuxsteamrt64 only.

Prerequisites#

  1. A Counter-Strike 2 dedicated server (Linux x86-64 / linuxsteamrt64).
  2. Stock Metamod:Source with plugin API (PLAPI) 18 support, installed under game/csgo/addons/metamod/. No patched or custom Metamod host is required; a compatible official upstream release is fine if you confirm PLAPI for that release and every other native plugin on the server.
  3. Custom Panorama HUD also needs MultiAddonManager v1.6.1 or later. v1.6 is stale for CS2 builds 25515854+: the addon-list offset does not match, so clients never mount the HUD addon. See HUD.

Install the runtime#

  1. Download the latest s2script-cs2-linux-*.zip from the Download page (or GitHub Releases).
  2. Extract into game/csgo/ so addons/ overlays in place. That creates a SHA-256–verified CS2 game package under addons/s2script/:
addons/s2script/
  bin/linuxsteamrt64/s2script.so
  bin/linuxsteamrt64/libs2script_core.so
  game-packages.json
  game-packages/cs2/index.js
  game-packages/cs2/gamedata.json
  game-packages/cs2/trusted-functions.json
  gamedata/core/
  gamedata/sdkhooks/
  plugins/

game-packages.json is selected-package metadata plus artifact hashes. The native shim (s2script.so) and core (libs2script_core.so) must ship as a pair — replace the whole zip rather than mixing versions.

Operator overrides still live in addons/s2script/gamedata/cs2/custom/ and apply after the verified package data (acquire, HUD-click, and damage signature repairs included). Every repair is reported at boot. Shipped game files are no longer loaded from gamedata/cs2/ or js/pawn.js; there is no prelude-by-path fallback.

  1. Patch gameinfo.gi so Metamod is the first SearchPath:
Game    csgo/addons/metamod
  1. Ensure addons/s2script/configs and addons/s2script/data are writable.
  2. Restart the server and confirm with meta list.

The native s2script shim stays resident during gameplay. .s2sp plugins still hot-reload inside s2script; stop and restart the server for native shim or Metamod updates.

Operators can bound native async admission with S2SCRIPT_ASYNC_LIMITS_JSON before starting the process — Async & networking.

Base plugins#

The release zip includes the SourceMod-parity suite (basecommands, basechat, playercommands, antiflood, adminhelp, basecomm, basebans, reservedslots, basetriggers, funcommands, clientprefs, adminmenu, basevotes, zones).

First adoption of the versioned cookie schema needs matched core and clientprefs artifacts installed with the server stopped, then a fresh process. Do not hot-load a newer clientprefs over an older generation with unversioned cookie writes still in flight. clientprefs is the sole cookie-table writer — see Cookies.

Opt-in plugins (nominations, rockthevote, nextmap, funvotes) live under plugins/disabled/ — the loader’s non-recursive scan skips that subdirectory. To enable one, move its .s2sp up one level into addons/s2script/plugins/.

Next#