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
CSPrecacheobject - Added
CSPrecachemethods:IsServerLoading,IsServerLoaded,IsClientLoading,IsClientLoaded,IsLoadedForAll,Release
Hostage APIs and events
- Added
CSHostagemethods:IsBeingPickedUp,IsBeingCarried,IsRescued,GetRescuer,GetPickUpStartTime,GetPickUpFinishTime - Added player/instance hooks:
CSPlayerPawn.GetHostage - Added
Instanceevents:OnHostagePickUpStart,OnHostagePickUpAbort,OnHostagePickUp,OnHostageDrop,OnHostageRescue,OnHostageKill
Console export and convars
- Added new top-level export:
Console - Added
Consolefunctions:GetConvarBoolean,GetConvarNumber,GetConvarString,GetConvarVector,GetConvarQAngle,GetConvarColor,SetConvar - Behavior:
Console.SetConvaris not restricted bysv_cheatsand executes synchronously - Renames / moves:
Instance.Msgrenamed toConsole.Log;Instance.ClientCommand,ServerCommandandRegisterCheatCommandmoved toConsole
GameRules changes
- Added new top-level export:
GameRules - Added
GameRulesmethods: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_layoutclasses:HUD_TEAMMENU_VISIBLE,HUD_CHAT_VISIBLE - Radar change:
radar_elementcan now appear on the radar in every game mode, not just Rush - Money support / fixes: Added support for
GameRules.AddTeamMoneywithCSTeamMoneyReason.NONEand an amount; fixed a crash inGameRules.AddTeamMoneywithCSTeamMoneyReason.NONE
Fixes and other improvements
- Enum fixes: Fixed
CSTeamMoneyReasonenum values not matchingpoint_script.d.ts; fixedCSWeaponAttackTypeenum values not matchingpoint_script.d.ts - Return type fixes: Fixed
CSRadarPoint.IsVisibleToTeamreturning a number instead of a boolean; fixedCSObservablePoint.IsObservableForTeamreturning 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_workshopcommand

