CS2 update, October 22, 2026: expanded map script API
What changed
- Added Instance.Precache
- Returns a CSPrecache object
- Added CSPrecache.IsServerLoading
- Added CSPrecache.IsServerLoaded
- Added CSPrecache.IsClientLoading
- Added CSPrecache.IsClientLoaded
- Added CSPrecache.IsLoadedForAll
- Added CSPrecache.Release
- Added CSHostage
- Added CSHostage.IsBeingPickedUp
- Added CSHostage.IsBeingCarried
- Added CSHostage.IsRescued
- Added CSHostage.GetRescuer
- Added CSHostage.GetPickUpStartTime
- Added CSHostage.GetPickUpFinishTime
- Added CSPlayerPawn.GetHostage
- Added Instance.OnHostagePickUpStart
- Added Instance.OnHostagePickUpAbort
- Added Instance.OnHostagePickUp
- Added Instance.OnHostageDrop
- Added Instance.OnHostageRescue
- Added Instance.OnHostageKill
- Added new top level export Console
- Added Console.GetConvarBoolean
- Added Console.GetConvarNumber
- Added Console.GetConvarString
- Added Console.GetConvarVector
- Added Console.GetConvarQAngle
- Added Console.GetConvarColor
- Added Console.SetConvar
- Console.SetConvar is not restricted by sv_cheats and executes synchronously
- Renamed Instance.Msg to Console.Log
- Moved Instance.ClientCommand, ServerCommand and RegisterCheatCommand to Console
- Added new top level export GameRules
- Added GameRules.StartWarmup
- Added GameRules.EndWarmup
- Added GameRules.GetTeamScore
- Added GameRules.AddTeamScore
- Added GameRules.TerminateRound
- Moved Instance.IsWarmupPeriod, IsFreezePeriod, IsTeamIntroPeriod, GetRoundsPlayed, GetRoundRemainingTime, SetRoundRemainingTime and AddTeamMoney to GameRules
- Moved and renamed methods are still available in their original location, deprecated
- Added top-level custom_hud_layout classes HUD_TEAMMENU_VISIBLE and HUD_CHAT_VISIBLE
- radar_element can now appear on the radar in every game mode, not just Rush
- Added support for GameRules.AddTeamMoney with CSTeamMoneyReason.NONE and an amount
- Fixed a crash in GameRules.AddTeamMoney with CSTeamMoneyReason.NONE
- Fixed CSTeamMoneyReason enum values not matching point_script.d.ts
- Fixed CSWeaponAttackType enum values not matching point_script.d.ts
- Fixed CSRadarPoint.IsVisibleToTeam returning a number instead of a boolean
- Fixed CSObservablePoint.IsObservableForTeam returning a number instead of a boolean
- 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
- Improved auto complete of the map_workshop command
What it means for players and servers
Valve released a major update to Counter-Strike 2's VScript API, adding new functions for hostage handling, console commands, and game rules management. For regular players, this means mapmakers and modders will have more tools to create unique game modes and mechanics. New methods allow precise tracking of hostage state, warmup control, and team resource management through scripts.
For community server administrators, these changes are significant. New top-level Console and GameRules objects provide direct access to convars and match rules. Console commands are now available in scripts without sv_cheats restrictions, and legacy methods remain available but marked as deprecated for backward compatibility. Plugins and VScript-based maps will gain more flexible control over gameplay flow and server state.
The update also included numerous fixes for enum type mismatches and boolean return values, preventing developer errors when working with coordinates, radar visibility, and observation functions. Improved warning logs now include call stacks, making it easier to debug custom scripts on live servers.
Source: original on Steam
