Official updateOct 22, 2026, 10:56 PM UTC

Scripting API additions and fixes (Oct 22, 2026)

Adds new scripting exports and APIs (precache, hostage, Console, GameRules), HUD and radar updates, and multiple fixes and logging improvements.

Quick read

  • Added `Instance.Precache` and the `CSPrecache` API
  • Added `CSHostage` methods and hostage-related `Instance` events
  • Added a top-level `Console` export with convar get/set functions; `Console.SetConvar` executes synchronously and is not restricted by `sv_cheats`
  • Renamed `Instance.Msg` to `Console.Log` and moved client/server command functions to `Console`
  • Added a top-level `GameRules` export, new game rule methods, and moved several existing methods to `GameRules` (deprecated in original locations)
  • Added HUD classes `HUD_TEAMMENU_VISIBLE` and `HUD_CHAT_VISIBLE`, and allowed `radar_element` on the radar in all game modes
  • Added support for `GameRules.AddTeamMoney` with `CSTeamMoneyReason.NONE` and fixed a related crash
  • Fixed enum and return-type mismatches, improved logged warnings, and improved `map_workshop` command auto complete

This update adds new scripting exports and APIs, hostage-related methods and events, a top-level Console export with convar access, GameRules changes, HUD and radar updates, and a number of fixes and logging improvements.

New precache API

  • Added: Instance.Precache
  • Returns: a CSPrecache object
  • Added CSPrecache methods: IsServerLoading, IsServerLoaded, IsClientLoading, IsClientLoaded, IsLoadedForAll, Release

Hostage APIs and events

  • Added CSHostage methods: IsBeingPickedUp, IsBeingCarried, IsRescued, GetRescuer, GetPickUpStartTime, GetPickUpFinishTime
  • Added player/instance hooks: CSPlayerPawn.GetHostage
  • Added Instance events: OnHostagePickUpStart, OnHostagePickUpAbort, OnHostagePickUp, OnHostageDrop, OnHostageRescue, OnHostageKill

Console export and convars

  • Added new top-level export: Console
  • Added Console functions: GetConvarBoolean, GetConvarNumber, GetConvarString, GetConvarVector, GetConvarQAngle, GetConvarColor, SetConvar
  • Behavior: Console.SetConvar is not restricted by sv_cheats and executes synchronously
  • Renames / moves: Instance.Msg renamed to Console.Log; Instance.ClientCommand, ServerCommand and RegisterCheatCommand moved to Console

GameRules changes

  • Added new top-level export: GameRules
  • Added GameRules methods: StartWarmup, EndWarmup, GetTeamScore, AddTeamScore, TerminateRound
  • Moved to GameRules: IsWarmupPeriod, IsFreezePeriod, IsTeamIntroPeriod, GetRoundsPlayed, GetRoundRemainingTime, SetRoundRemainingTime, AddTeamMoney
  • Compatibility: Moved and renamed methods are still available in their original location, deprecated

HUD, radar, and money

  • Added top-level custom_hud_layout classes: HUD_TEAMMENU_VISIBLE, HUD_CHAT_VISIBLE
  • Radar change: radar_element can now appear on the radar in every game mode, not just Rush
  • Money support / fixes: Added support for GameRules.AddTeamMoney with CSTeamMoneyReason.NONE and an amount; fixed a crash in GameRules.AddTeamMoney with CSTeamMoneyReason.NONE

Fixes and other improvements

  • Enum fixes: Fixed CSTeamMoneyReason enum values not matching point_script.d.ts; fixed CSWeaponAttackType enum values not matching point_script.d.ts
  • Return type fixes: Fixed CSRadarPoint.IsVisibleToTeam returning a number instead of a boolean; fixed CSObservablePoint.IsObservableForTeam returning a number instead of a boolean
  • Logging improvements: Logged warnings now include the JS call stack; logged warnings now include details about bad argument values; logged warnings now count arguments from 0 instead of 1
  • Other: Improved auto complete of the map_workshop command
Back to updates

Recent updates