Counter-Strike 2 update

Build 24916958

24 Aug 2026, 23:38 UTC

Official patch notes

Available

Counter-Strike 2 Update
Read patch notes

Technical changes

91 files changed

+826 additions-302 removals
View file changes

Official patch notes

Counter-Strike 2 Update

Published 24 Aug 2026, 23:39 UTC

MAP SCRIPTING

  • Added custom_hud_layout entity:

    • custom_hud_layouts are the entry point for scripted maps to provide custom UI.

    • Panel, Label, Image, and Button panel types are supported.

    • Styling with css is supported.

    • Events and client side scripting are not supported.

    • Maintains state during tools mode reloads.

  • Added cs_player_camera entity:

    • Gives control of a player's view without moving their pawn.

    • Can be configured to let the player look around from the scripted position.

  • Added Instance.Delay

  • Added Instance.OnBombPlantStart

  • Added Instance.OnBombPlantAbort

  • Added Instance.OnBombDefuseStart

  • Added Instance.OnBombDefuseAbort

  • Added Instance.OnCustomHudClicked

  • Added Instance.IsDedicatedServer

  • Added Entity.Move

  • Added Entity.GetMoveType

  • Added Entity.SetMoveType

  • Added CSPlayerPawn.GetC4

  • Added CSPlayerPawn.GetDefuseTarget

  • Added CSPlayerPawn.IsBuyMenuOpen

  • Added CSPlayerPawn.GetCamera

  • Added C4.GetPlantStartTime

  • Added C4.GetPlantFinishTime

  • Added C4.AbortPlant

  • Added CustomHudLayout.SetHasClass

  • Added CustomHudLayout.SetHasClassForPlayer

  • Added CustomHudLayout.SetDialogVariableString

  • Added CustomHudLayout.SetDialogVariableStringForPlayer

  • Added CustomHudLayout.SetInputCaptureEnabled

  • Added CustomHudLayout.IsInputCaptureEnabled

  • Added CSPlayerCamera.IsEnabled

  • Added CSPlayerCamera.SetEnabled

  • Added CSPlayerCamera.SetIsControllingAngles

  • Added enum CSMoveType

  • Corrected types for some events where parameters were maybe undefined.

  • Errors encountered during initial script run are now logged to the console.

  • Unhandled promise rejections are now logged to the console.

  • Added the column number to errors caught during the CompileModule step of script loading.

  • Deprecated planter from Instance.OnBombPlant event

  • Deprecated defuser from Instance.OnBombDefuse event

Technical changes

Changed files

Showing 20 of 91 tracked files.

91 files+826-302
M
DumpSource2/.stringsignore
+27-0
@@ -1593,6 +1593,9 @@ CCS2PawnGraphController
15931593 CCS2UIPawnGraphController
15941594 CCS2WeaponGraphController
15951595 CCSBot
1596+CCSCustomHudLayout
1597+CCSCustomHudLayoutState
1598+CCSCustomHudLayout_API
15961599 CCSGO_EndOfMatchLineupEnd
15971600 CCSGO_EndOfMatchLineupEndpoint
15981601 CCSGO_EndOfMatchLineupStart
@@ -1629,6 +1632,7 @@ CCSPlayerAnimationState::Direction_t
16291632 CCSPlayerAnimationState::GroundMoveState_t
16301633 CCSPlayerAnimationState::MoveType_t
16311634 CCSPlayerBase_CameraServices
1635+CCSPlayerCamera
16321636 CCSPlayerController
16331637 CCSPlayerController_API
16341638 CCSPlayerController_ActionTrackingServices
@@ -3208,6 +3212,7 @@ CS_UM_CloseCaptionDirect
32083212 CS_UM_CounterStrafe
32093213 CS_UM_CurrentRoundOdds
32103214 CS_UM_CurrentTimescale
3215+CS_UM_CustomHudClicked
32113216 CS_UM_Damage
32123217 CS_UM_DamagePrediction
32133218 CS_UM_DeepStats
@@ -5605,6 +5610,7 @@ EHG_RightLeg
56055610 EHG_Stomach
56065611 EHapticPulseType
56075612 EHitGroup
5613+EHudPanelClassStatus_t
56085614 EIKEndEffectorRotationFixUpMode
56095615 EInButtonState
56105616 EInitSystemResult
@@ -6976,6 +6982,8 @@ HSequence
69766982 HUD Bucket
69776983 HUD Bucket Position
69786984 HUD Positions
6985+HUDPanelDialogVariableString_t
6986+HUDPanelHasClass_t
69796987 HULL_HUMAN
69806988 HULL_LARGE
69816989 HULL_LARGE_CENTERED
@@ -17368,6 +17376,9 @@ k_UnlockStyle_Failed_CantCommit
1736817376 k_UnlockStyle_Failed_CantLockCache
1736917377 k_UnlockStyle_Failed_PreReq
1737017378 k_UnlockStyle_Succeeded
17379+k_eHudPanelClassStatus_DoesNotHaveClass
17380+k_eHudPanelClassStatus_HasClass
17381+k_eHudPanelClassStatus_Undefined
1737117382 k_eSplinePushAlong
1737217383 k_eSplinePushAway
1737317384 k_eSplinePushTowards
@@ -19841,6 +19852,7 @@ m_bInitialized
1984119852 m_bInitializedTags
1984219853 m_bInitiallyPopulateInterpHistory
1984319854 m_bInitiatedSelfDelete
19855+m_bInputCaptureEnabled
1984419856 m_bInspectPending
1984519857 m_bInspectShouldLoop
1984619858 m_bInterpolate
@@ -19886,6 +19898,7 @@ m_bIsClosedLoop
1988619898 m_bIsContinuousEnabled
1988719899 m_bIsControlInput
1988819900 m_bIsControlOutput
19901+m_bIsControllingAngles
1988919902 m_bIsDefusing
1989019903 m_bIsDisableTag
1989119904 m_bIsDisabled
@@ -21278,6 +21291,7 @@ m_eAngleMode
2127821291 m_eBehavior
2127921292 m_eBlendMode
2128021293 m_eChoreoState
21294+m_eClassStatus
2128121295 m_eConflictType
2128221296 m_eCorrectionMethod
2128321297 m_eCurrentOpenDirection
@@ -23855,6 +23869,7 @@ m_gamePhase
2385523869 m_gameplayRelevantBones
2385623870 m_gearRatio
2385723871 m_gibDespawnTime
23872+m_globalLayoutState
2385823873 m_globalstate
2385923874 m_glovesItem
2386023875 m_glowColor
@@ -25226,6 +25241,7 @@ m_nChildNodeIdx
2522625241 m_nChildren
2522725242 m_nChoice
2522825243 m_nChunk
25244+m_nClassNameIndex
2522925245 m_nClavicleLeftJointIndex
2523025246 m_nClavicleRightJointIndex
2523125247 m_nClientHealthFadeParityValue
@@ -25391,6 +25407,7 @@ m_nDetailLayerMask
2539125407 m_nDetailLayerMaskType
2539225408 m_nDetailLevel
2539325409 m_nDetailObjectFadeLevel
25410+m_nDialogVariableIndex
2539425411 m_nDim
2539525412 m_nDimensionCount
2539625413 m_nDimensionStartIndex
@@ -26033,6 +26050,7 @@ m_nPackedMax
2603326050 m_nPackedMin
2603426051 m_nPackedSurfaceNormalOs
2603526052 m_nPackedSurfaceTangentOs
26053+m_nPanelIdIndex
2603626054 m_nPanoramaRenderRes
2603726055 m_nParamCount
2603826056 m_nParamIndex
@@ -26956,6 +26974,7 @@ m_playbackSpeed
2695626974 m_playbackType
2695726975 m_playerHoldingVote
2695826976 m_playerOverrideForVote
26977+m_playerSlot
2695926978 m_playerTravelDistance
2696026979 m_plug0
2696126980 m_plug1
@@ -27239,6 +27258,7 @@ m_sTransitionType
2723927258 m_sUniqueHammerID
2724027259 m_sUnlockedSound
2724127260 m_sUseSound
27261+m_sValue
2724227262 m_sWeaponName
2724327263 m_safeTime
2724427264 m_sampleCodes
@@ -27473,6 +27493,7 @@ m_strGraphName
2747327493 m_strInitWith_Container
2747427494 m_strItemClass
2747527495 m_strLandmarkName
27496+m_strLayout
2747627497 m_strLightStyle
2747727498 m_strLightStyle == ''
2747827499 m_strMapToLoad
@@ -28179,6 +28200,7 @@ m_vecCSSClasses
2817928200 m_vecCachedRenderMaxs
2818028201 m_vecCachedRenderMins
2818128202 m_vecCenter
28203+m_vecClassNames
2818228204 m_vecClientAngles
2818328205 m_vecClientOrigin
2818428206 m_vecClusterForProbe
@@ -28208,6 +28230,8 @@ m_vecDeathInfoOrigin
2820828230 m_vecDebugOverlayData
2820928231 m_vecDefaultValue
2821028232 m_vecDestination
28233+m_vecDialogVariableNames
28234+m_vecDialogVariableStrings
2821128235 m_vecDictionary
2821228236 m_vecDirectionBias
2821328237 m_vecDistanceBias
@@ -28249,6 +28273,7 @@ m_vecGravityForce
2824928273 m_vecGrenadeSpin
2825028274 m_vecGrowthOrigin
2825128275 m_vecHarmonics
28276+m_vecHasClasses
2825228277 m_vecHeadColorScale
2825328278 m_vecHistory
2825428279 m_vecHitBoxScale
@@ -28333,6 +28358,7 @@ m_vecOutputMin
2833328358 m_vecOutsideField
2833428359 m_vecOverlappingLinks
2833528360 m_vecPairedSequences
28361+m_vecPanelIds
2833628362 m_vecPanelSize
2833728363 m_vecPanelSpaceStressPositionA
2833828364 m_vecPanelSpaceStressPositionB
@@ -28352,6 +28378,7 @@ m_vecPatternSndEvts
2835228378 m_vecPatterns
2835328379 m_vecPlaneDirection
2835428380 m_vecPlaneNormal
28381+m_vecPlayerLayoutStates
2835528382 m_vecPlayerMountPositionBottom
2835628383 m_vecPlayerMountPositionTop
2835728384 m_vecPlayerPatchEconIndices
M
DumpSource2/module_metadata/client.kv3
+3-2
@@ -252,7 +252,7 @@
252252 name = "CS2Hud_client"
253253 group = "GameSessionManifest_client"
254254 source_file = "src/game/client/cstrike15/panorama/hud/csgo_hud.cpp"
255- source_line = 111
255+ source_line = 119
256256 resources =
257257 [
258258 resource_name:"particles/ui/ammohealthcenter/ui_hud_kill_streaks_spectator_1.vpcf",
@@ -1341,7 +1341,7 @@
13411341 name = "C4Precache"
13421342 group = "GameStartup"
13431343 source_file = "src/game/shared/cstrike15/weapon_c4.cpp"
1344- source_line = 70
1344+ source_line = 71
13451345 resources =
13461346 [
13471347 resource_name:"weapons/models/c4/weapon_c4.vmdl",
@@ -1614,6 +1614,7 @@
16141614 "@lib:client.dll!CBaseModelEntityAPI" = 3048515998
16151615 "@lib:client.dll!CBasePlayerControllerAPI" = 553202478
16161616 "@lib:client.dll!CBaseTriggerAPI" = 3016686793
1617+ "@lib:client.dll!CCSCustomHudLayout_API" = 0
16171618 "@lib:client.dll!CCSGO_TeamPreviewCharacterPosition_API" = 0
16181619 "@lib:client.dll!CCSPlayerController_API" = 0
16191620 "@lib:client.dll!CCSWeaponBase_API" = 0
M
DumpSource2/module_metadata/server.kv3
+4-3
@@ -544,7 +544,7 @@
544544 name = "weapon_c4_server"
545545 group = "GameSessionManifest_server"
546546 source_file = "src/game/shared/cstrike15/weapon_c4.cpp"
547- source_line = 331
547+ source_line = 334
548548 resources =
549549 [
550550 resource_name:"weapon_c4.ventr",
@@ -554,7 +554,7 @@
554554 name = "planted_c4_server"
555555 group = "GameSessionManifest_server"
556556 source_file = "src/game/shared/cstrike15/weapon_c4.cpp"
557- source_line = 318
557+ source_line = 321
558558 resources =
559559 [
560560 resource_name:"planted_c4.ventr",
@@ -564,7 +564,7 @@
564564 name = "C4Precache"
565565 group = "GameStartup"
566566 source_file = "src/game/shared/cstrike15/weapon_c4.cpp"
567- source_line = 70
567+ source_line = 71
568568 resources =
569569 [
570570 resource_name:"weapons/models/c4/weapon_c4.vmdl",
@@ -942,6 +942,7 @@
942942 "@lib:server.dll!CBaseTriggerAPI" = 3016686793
943943 "@lib:server.dll!CBuyZone_API" = 3954856496
944944 "@lib:server.dll!CChicken_API" = 0
945+ "@lib:server.dll!CCSCustomHudLayout_API" = 0
945946 "@lib:server.dll!CCSGO_TeamPreviewCharacterPosition_API" = 0
946947 "@lib:server.dll!CCSObserverPawn_API" = 0
947948 "@lib:server.dll!CCSPlace_API" = 0
A
DumpSource2/schemas/client/CCSCustomHudLayout.h
+9-0
@@ -0,0 +1,9 @@
1+class CCSCustomHudLayout : public C_BaseEntity
2+{
3+ CUtlSymbolLarge m_strLayout;
4+ C_UtlVectorEmbeddedNetworkVar< CCSCustomHudLayoutState > m_vecPlayerLayoutStates;
5+ CCSCustomHudLayoutState m_globalLayoutState;
6+ C_NetworkUtlVectorBase< CUtlString > m_vecPanelIds;
7+ C_NetworkUtlVectorBase< CUtlString > m_vecClassNames;
8+ C_NetworkUtlVectorBase< CUtlString > m_vecDialogVariableNames;
9+};
A
DumpSource2/schemas/client/CCSCustomHudLayoutState.h
+7-0
@@ -0,0 +1,7 @@
1+class CCSCustomHudLayoutState
2+{
3+ bool m_bInputCaptureEnabled;
4+ C_NetworkUtlVectorBase< HUDPanelHasClass_t > m_vecHasClasses;
5+ C_NetworkUtlVectorBase< HUDPanelDialogVariableString_t > m_vecDialogVariableStrings;
6+ CPlayerSlot m_playerSlot;
7+};
A
DumpSource2/schemas/client/CCSCustomHudLayout_API.h
+3-0
@@ -0,0 +1,3 @@
1+class CCSCustomHudLayout_API
2+{
3+};
A
DumpSource2/schemas/client/CCSPlayerCamera.h
+6-0
@@ -0,0 +1,6 @@
1+class CCSPlayerCamera : public C_BaseEntity
2+{
3+ CHandle< C_CSPlayerPawnBase > m_hPawn;
4+ bool m_bEnabled;
5+ bool m_bIsControllingAngles;
6+};
M
DumpSource2/schemas/client/ECstrike15UserMessages.h
+1-0
@@ -78,4 +78,5 @@ enum ECstrike15UserMessages : uint32_t
7878 CS_UM_RecurringMissionSchema = 387,
7979 CS_UM_SendPlayerLoadout = 388,
8080 CS_UM_WeaponMagDrop = 389,
81+ CS_UM_CustomHudClicked = 390,
8182 };
A
DumpSource2/schemas/client/EHudPanelClassStatus_t.h
+6-0
@@ -0,0 +1,6 @@
1+enum EHudPanelClassStatus_t : uint32_t
2+{
3+ k_eHudPanelClassStatus_Undefined = -1,
4+ k_eHudPanelClassStatus_DoesNotHaveClass = 0,
5+ k_eHudPanelClassStatus_HasClass = 1,
6+};
A
DumpSource2/schemas/client/HUDPanelDialogVariableString_t.h
+7-0
@@ -0,0 +1,7 @@
1+class HUDPanelDialogVariableString_t
2+{
3+ uint16 m_nPanelIdIndex;
4+ uint16 m_nDialogVariableIndex;
5+ CUtlString m_sValue;
6+ bool m_bIsSet;
7+};
A
DumpSource2/schemas/client/HUDPanelHasClass_t.h
+11-0
@@ -0,0 +1,11 @@
1+// MGetKV3ClassDefaults = {
2+// "m_nPanelIdIndex": 0,
3+// "m_nClassNameIndex": 0,
4+// "m_eClassStatus": "k_eHudPanelClassStatus_DoesNotHaveClass"
5+//}
6+class HUDPanelHasClass_t
7+{
8+ uint16 m_nPanelIdIndex;
9+ uint16 m_nClassNameIndex;
10+ EHudPanelClassStatus_t m_eClassStatus;
11+};
A
DumpSource2/schemas/server/CCSCustomHudLayout.h
+9-0
@@ -0,0 +1,9 @@
1+class CCSCustomHudLayout : public CBaseEntity
2+{
3+ CUtlSymbolLarge m_strLayout;
4+ CUtlVectorEmbeddedNetworkVar< CCSCustomHudLayoutState > m_vecPlayerLayoutStates;
5+ CCSCustomHudLayoutState m_globalLayoutState;
6+ CNetworkUtlVectorBase< CUtlString > m_vecPanelIds;
7+ CNetworkUtlVectorBase< CUtlString > m_vecClassNames;
8+ CNetworkUtlVectorBase< CUtlString > m_vecDialogVariableNames;
9+};
A
DumpSource2/schemas/server/CCSCustomHudLayoutState.h
+7-0
@@ -0,0 +1,7 @@
1+class CCSCustomHudLayoutState
2+{
3+ bool m_bInputCaptureEnabled;
4+ CNetworkUtlVectorBase< HUDPanelHasClass_t > m_vecHasClasses;
5+ CNetworkUtlVectorBase< HUDPanelDialogVariableString_t > m_vecDialogVariableStrings;
6+ CPlayerSlot m_playerSlot;
7+};
A
DumpSource2/schemas/server/CCSCustomHudLayout_API.h
+3-0
@@ -0,0 +1,3 @@
1+class CCSCustomHudLayout_API
2+{
3+};
A
DumpSource2/schemas/server/CCSPlayerCamera.h
+6-0
@@ -0,0 +1,6 @@
1+class CCSPlayerCamera : public CBaseEntity
2+{
3+ CHandle< CCSPlayerPawnBase > m_hPawn;
4+ bool m_bEnabled;
5+ bool m_bIsControllingAngles;
6+};
M
DumpSource2/schemas/server/dynpitchvol_base_t.h
+2-2
@@ -17,8 +17,8 @@
1717 // "pitch": 0,
1818 // "spinupsav": 0,
1919 // "spindownsav": 0,
20-// "pitchfrac": 1746166794,
21-// "vol": 32762,
20+// "pitchfrac": -1936887446,
21+// "vol": 32761,
2222 // "fadeinsav": 0,
2323 // "fadeoutsav": 0,
2424 // "volfrac": 0,
M
DumpSource2/schemas/server/dynpitchvol_t.h
+2-2
@@ -17,8 +17,8 @@
1717 // "pitch": 0,
1818 // "spinupsav": 0,
1919 // "spindownsav": 0,
20-// "pitchfrac": 1746166794,
21-// "vol": 32762,
20+// "pitchfrac": -1936887446,
21+// "vol": 32761,
2222 // "fadeinsav": 0,
2323 // "fadeoutsav": 0,
2424 // "volfrac": 0,
M
Protobufs/cstrike15_usermessages.proto
+6-0
@@ -80,6 +80,7 @@ enum ECstrike15UserMessages {
8080 CS_UM_RecurringMissionSchema = 387;
8181 CS_UM_SendPlayerLoadout = 388;
8282 CS_UM_WeaponMagDrop = 389;
83+ CS_UM_CustomHudClicked = 390;
8384 }
8485
8586 enum ECSUsrMsg_DisconnectToLobby_Action {
@@ -632,6 +633,11 @@ message CCSUsrMsg_SendPlayerLoadout {
632633 optional int32 playerslot = 2 [default = -1];
633634 }
634635
636+message CCSUsrMsg_CustomHudClicked {
637+ optional uint32 custom_hud_layout = 1 [default = 16777215];
638+ optional string button_id = 2;
639+}
640+
635641 message CVacNet_GetReviewerInfo_Request {
636642 optional uint32 appid = 1;
637643 }
M
content/csgo/maps/editor/zoo/scripts/chess.js
+4-23
@@ -3496,7 +3496,7 @@ async function RunChess() {
34963496 RenderPieces();
34973497
34983498 while (!chess.isGameOver()) {
3499- await Delay(0);
3499+ await Instance.Delay(0);
35003500 const move = await AIMove();
35013501 await AnimateMove(move);
35023502 }
@@ -3596,7 +3596,7 @@ async function SlidePiece(piece, from, to) {
35963596 } else {
35973597 const midPos = { x: startPos.x + dx * t, y: startPos.y + dy * t, z: startPos.z + dz * t };
35983598 piece.Teleport({ position: midPos });
3599- await Delay(0);
3599+ await Instance.Delay(0);
36003600 }
36013601 }
36023602 }
@@ -3617,7 +3617,7 @@ async function DiePiece(piece) {
36173617 return;
36183618 } else {
36193619 piece.Teleport({ position: { ...startPos, z: startPos.z + dieZ * t } });
3620- await Delay(0);
3620+ await Instance.Delay(0);
36213621 }
36223622 }
36233623 }
@@ -3669,7 +3669,7 @@ async function Minimax(depth, color, maximize) {
36693669 if (depth === 0 || chess.isGameOver()) {
36703670 fitnessQuota--;
36713671 if (fitnessQuota <= 0) {
3672- await Delay(0);
3672+ await Instance.Delay(0);
36733673 fitnessQuota = fullFitnessQuota;
36743674 }
36753675 return GetFitness(color);
@@ -3747,24 +3747,6 @@ function Init(oldChess) {
37473747 Instance.SetNextThink(Instance.GetGameTime());
37483748 }
37493749
3750-/** @type {{ time: number, callback: () => void }[]} */
3751-const thinkQueue = [];
3752-/** @param {number} time @param {() => void} callback */
3753-function QueueThink(time, callback) {
3754- const indexAfter = thinkQueue.findIndex((t) => t.time > time);
3755- if (indexAfter === -1) thinkQueue.push({ time, callback });
3756- else thinkQueue.splice(indexAfter, 0, { time, callback });
3757- if (indexAfter === 0 || indexAfter === -1) Instance.SetNextThink(time);
3758-}
3759-function RunThinkQueue() {
3760- const upperThinkTime = Instance.GetGameTime() + 1 / 128;
3761- while (thinkQueue.length > 0 && thinkQueue[0].time <= upperThinkTime) thinkQueue.shift().callback();
3762- if (thinkQueue.length > 0) Instance.SetNextThink(thinkQueue[0].time);
3763-}
3764-function Delay(delay) {
3765- return new Promise((resolve) => QueueThink(Instance.GetGameTime() + delay, resolve));
3766-}
3767-
37683750 Instance.OnActivate(Init);
37693751
37703752 Instance.OnScriptReload({
@@ -3778,7 +3760,6 @@ Instance.OnScriptReload({
37783760 });
37793761
37803762 Instance.SetThink(() => {
3781- RunThinkQueue();
37823763 RunChess();
37833764 });
M
content/csgo/maps/editor/zoo/scripts/point_script.d.ts
+121-10
@@ -77,6 +77,8 @@ declare module "cs_script/point_script"
7777 SetThink(callback: () => void): void;
7878 /** Set when the OnThink callback should next be run. The exact time will be on the tick nearest to the specified time, which may be earlier or later. */
7979 SetNextThink(time: number): void;
80+ /** Returns a promise that resolves after `delay` number of seconds. The exact time will be on the tick nearest to the specified delay, which may be earlier or later. */
81+ Delay(delay: number): Promise<void>;
8082
8183 /**
8284 * Queue up a callback to be invoked once, after all entities have executed their think functions this tick (eg. player input has been handled, projectiles have moved).
@@ -111,10 +113,18 @@ declare module "cs_script/point_script"
111113 * Please send feedback to CSGOTeamFeedback@valvesoftware.com with "cs_script Feedback" in the subject line.
112114 */
113115 OnBeginRoundRestart(callback: () => void): void;
114- /** Called when a player plants the c4 */
115- OnBombPlant(callback: (event: { plantedC4: CSPlantedC4, planter: CSPlayerPawn }) => void): void;
116- /** Called when a player defuses the c4 */
117- OnBombDefuse(callback: (event: { plantedC4: CSPlantedC4, defuser: CSPlayerPawn }) => void): void;
116+ /** Called when a player starts planting their c4 */
117+ OnBombPlantStart(callback: (event: { planter: CSPlayerPawn }) => void): void;
118+ /** Called when a player aborts planting their c4 */
119+ OnBombPlantAbort(callback: (event: { planter: CSPlayerPawn }) => void): void;
120+ /** Called when a player plants their c4 */
121+ OnBombPlant(callback: (event: BombPlantEvent) => void): void;
122+ /** Called when a player starts defusing a c4 */
123+ OnBombDefuseStart(callback: (event: { plantedC4: CSPlantedC4 }) => void): void;
124+ /** Called when a player aborts defusing a c4 */
125+ OnBombDefuseAbort(callback: (event: { plantedC4: CSPlantedC4 }) => void): void;
126+ /** Called when a player defuses a c4 */
127+ OnBombDefuse(callback: (event: BombDefuseEvent) => void): void;
118128 /** Called when a c4 explodes */
119129 OnBombExplode(callback: (event: { plantedC4: CSPlantedC4 }) => void): void;
120130 /**
@@ -138,7 +148,7 @@ declare module "cs_script/point_script"
138148 /** Called when a player hits the ground while falling. */
139149 OnPlayerLand(callback: (event: { player: CSPlayerPawn }) => void): void;
140150 /** Called when a player sends a chat message. `team` will match they player's team if the message was sent to team chat. */
141- OnPlayerChat(callback: (event: { player: CSPlayerController | undefined, text: string, team: number }) => void): void;
151+ OnPlayerChat(callback: (event: { player?: CSPlayerController, text: string, team: number }) => void): void;
142152 /** Called when a player pings a location. */
143153 OnPlayerPing(callback: (event: { player: CSPlayerController, position: Vector }) => void): void;
144154 /** Called when a gun is reloaded. */
@@ -150,7 +160,7 @@ declare module "cs_script/point_script"
150160 * Penetrations can cause a single bullet to trigger multiple impacts.
151161 * This will be called for all impacts of a bullet before any player damage events are called.
152162 */
153- OnBulletImpact(callback: (event: { weapon: CSWeaponBase, position: Vector, hitEntity: Entity }) => void): void;
163+ OnBulletImpact(callback: (event: { weapon: CSWeaponBase, position: Vector, hitEntity?: Entity }) => void): void;
154164 /** Called when a weapon is dropped. */
155165 OnWeaponDrop(callback: (event: { weapon: CSWeaponBase, dropper: CSPlayerPawn }) => void): void;
156166 /** Called when a weapon is picked up. */
@@ -161,6 +171,8 @@ declare module "cs_script/point_script"
161171 OnGrenadeBounce(callback: (event: GrenadeBounceEvent) => void): void;
162172 /** Called when a knife attacks, even if it misses. */
163173 OnKnifeAttack(callback: (event: { weapon: CSWeaponBase, attackType: CSWeaponAttackType }) => void): void;
174+ /** Called when a button in a CustomHudLayout is clicked. */
175+ OnCustomHudClicked( callback: (event: {player: CSPlayerController, layout: CustomHudLayout, buttonId: string}) => void ): void;
164176
165177 /** Fire the input on all targets matching the specified names. */
166178 EntFireAtName(config: { name: string, input: string, value?: InputValue, caller?: Entity, activator?: Entity, delay?: number }): void;
@@ -195,6 +207,8 @@ declare module "cs_script/point_script"
195207 /** Trace as a bullet and detect hits and damage */
196208 TraceBullet(trace: BulletTrace): BulletTraceResult[];
197209
210+ /** Get if the server is a dedicated server. */
211+ IsDedicatedServer(): boolean;
198212 /** Get the game time in seconds. */
199213 GetGameTime(): number;
200214 /** Get if the game is currently in a Warmup period. */
@@ -253,6 +267,20 @@ declare module "cs_script/point_script"
253267 type Color = { r: number, g: number, b: number, a: number };
254268 type InputValue = boolean | number | string | Vector | Color | undefined;
255269
270+ export enum CSMoveType {
271+ INVALID = -1,
272+ NONE,
273+ WALK,
274+ FLY,
275+ FLYGRAVITY,
276+ VPHYSICS,
277+ PUSH,
278+ NOCLIP,
279+ OBSERVER,
280+ LADDER,
281+ CUSTOM,
282+ }
283+
256284 export enum CSRoundEndReason {
257285 UNKNOWN = -1,
258286 IN_PROGRESS,
@@ -467,6 +495,18 @@ declare module "cs_script/point_script"
467495 hitEntity?: Entity;
468496 }
469497
498+ interface BombPlantEvent {
499+ plantedC4: CSPlantedC4;
500+ /** @deprecated this field will be removed in a future update */
501+ planter?: CSPlayerPawn
502+ }
503+
504+ interface BombDefuseEvent {
505+ plantedC4: CSPlantedC4;
506+ /** @deprecated this field will be removed in a future update */
507+ defuser: CSPlayerPawn
508+ }
509+
470510 interface ModifyPlayerDamageEvent {
471511 /** The victim that is taking damage */
472512 player: CSPlayerPawn;
@@ -479,7 +519,7 @@ declare module "cs_script/point_script"
479519 /** The hit group where the damage occured. */
480520 hitGroup: CSHitGroup;
481521 /** The entity applying the damage. For bullets this is the owner of the gun. For grenades this is the exploding projectile. */
482- inflictor: Entity;
522+ inflictor?: Entity;
483523 /** The entity credited with causing the damage. For bullets this is the shooter. For grenades this is the thrower. */
484524 attacker?: Entity;
485525 /** The weapon used. For grenades this will not be present because the weapon is often removed before the projectile explodes. */
@@ -509,7 +549,7 @@ declare module "cs_script/point_script"
509549 /** The hit group where the damage occured. */
510550 hitGroup: CSHitGroup;
511551 /** The entity applying the damage. For bullets this is the owner of the gun. For grenades this is the exploding projectile. */
512- inflictor: Entity;
552+ inflictor?: Entity;
513553 /** The entity credited with causing the damage. For bullets this is the shooter. For grenades this is the thrower. */
514554 attacker?: Entity;
515555 /** The weapon used. For grenades this will not be present because the weapon is often removed before the projectile explodes. */
@@ -581,6 +621,10 @@ declare module "cs_script/point_script"
581621 GetEyePosition(): Vector;
582622 /** Update the physics state of this entity. */
583623 Teleport(newValues: { position?: Vector, angles?: QAngle, velocity?: Vector, angularVelocity?: RotationVector }): void;
624+ /** Move this entity without resetting the client's interpolation history. */
625+ Move(newValues: { position?: Vector, angles?: QAngle, velocity?: Vector, angularVelocity?: RotationVector }): void;
626+ GetMoveType(): CSMoveType;
627+ SetMoveType(moveType: CSMoveType): void;
584628 GetClassName(): string;
585629 GetEntityName(): string;
586630 SetEntityName(name: string): void;
@@ -647,6 +691,12 @@ declare module "cs_script/point_script"
647691 IsSilencerOn(): boolean;
648692 }
649693
694+ export class C4 extends CSWeaponBase {
695+ GetPlantStartTime(): number | undefined;
696+ GetPlantFinishTime(): number | undefined;
697+ AbortPlant(): void;
698+ }
699+
650700 export class CSWeaponData {
651701 GetName(): string;
652702 GetType(): CSWeaponType;
@@ -679,8 +729,8 @@ declare module "cs_script/point_script"
679729 IsDefused(): boolean;
680730 GetPlantTime(): number;
681731 GetExplodeTime(): number | undefined; // undefined if not active
682- GetDefuseStartTime(): number | undefined; // undefined if not defusing
683- GetDefuseFinishTime(): number | undefined; // undefined if not defusing
732+ GetDefuseStartTime(): number | undefined;
733+ GetDefuseFinishTime(): number | undefined;
684734 }
685735
686736 export class CSPlayerController extends Entity {
@@ -727,6 +777,7 @@ declare module "cs_script/point_script"
727777 FindWeapon(name: string): CSWeaponBase | undefined;
728778 FindWeaponBySlot(slot: CSGearSlot): CSWeaponBase | undefined;
729779 GetActiveWeapon(): CSWeaponBase | undefined;
780+ GetC4(): C4 | undefined;
730781 DestroyWeapon(target: CSWeaponBase): void;
731782 DestroyWeapons(): void;
732783 DropWeapon(target: CSWeaponBase): void;
@@ -738,21 +789,81 @@ declare module "cs_script/point_script"
738789 SetHasHelmet(hasHelmet: boolean): void;
739790 HasDefuser(): boolean;
740791 SetHasDefuser(hasDefuser: boolean): void;
792+ GetDefuseTarget(): CSPlantedC4 | undefined;
741793 IsDucking(): boolean;
742794 IsDucked(): boolean;
743795 IsScoped(): boolean;
744796 IsNoclipping(): boolean;
797+ IsBuyMenuOpen(): boolean;
798+ GetCamera(): CSPlayerCamera;
745799
746800 /** @deprecated This method will be removed in a future update */
747801 IsCrouching(): boolean;
748802 /** @deprecated This method will be removed in a future update */
749803 IsCrouched(): boolean;
750804 }
751805
806+ /**
807+ * CustomHudLayouts (custom_hud_layout) are the entry point for scripted maps to provide custom UI.
808+ * Supported panel types and attributes are:
809+ * * <Panel> with attributes id, class and hittest
810+ * * <Label> with attributes id, class, hittest, and text
811+ * * <Image> with attributes id, class, hittest, src, texturewidth, and textureheight
812+ * * <Button> with attributes id and class
813+ * Styling with css is supported.
814+ * Events and client side scripting are not supported.
815+ * @experimental This feature is experimental and may experience breaking changes.
816+ * Please send feedback to CSGOTeamFeedback@valvesoftware.com with "cs_script Feedback" in the subject line.
817+ */
818+ export class CustomHudLayout extends Entity {
819+ /**
820+ * Set if a panel has a class. Applies to all players.
821+ * Omit `hasClass` to revert to the original value.
822+ */
823+ SetHasClass(panelId: string, className: string, hasClass?: boolean): void;
824+ /**
825+ * Set if a panel has a class for a single player. Will override the all player value.
826+ * Omit `hasClass` to defer to the all player value.
827+ */
828+ SetHasClassForPlayer(playerSlot: number, panelId: string, className: string, hasClass?: boolean): void;
829+ /**
830+ * Set the value of a dialog variable. Applies to all players.
831+ */
832+ SetDialogVariableString(panelId: string, variableName: string, value: string): void;
833+ /**
834+ * Set the value of a dialog variable for a single player. Will override the all player value.
835+ * Omit `value` to defer to the all player value. If no all player value has been set, the value will be an empty string.
836+ */
837+ SetDialogVariableStringForPlayer(playerSlot: number, panelId: string, variableName: string, value?: string): void;
838+ /**
839+ * Set to true to force a player into cursor mode and enable click detection on the panels of this layout.
840+ * Set a callback with Instance.OnCustomHudClicked to listen for clicks.
841+ * Multiple CustomHudLayouts can have input captured at a time.
842+ * Players will get movement control back once all CustomHudLayouts have disabled input capture.
843+ */
844+ SetInputCaptureEnabled(playerSlot: number, enabled: boolean): void;
845+ /**
846+ * Get if this CustomHudLayout is capturing input for a player
847+ */
848+ IsInputCaptureEnabled(playerSlot: number): boolean;
849+ }
850+
752851 export class PointTemplate extends Entity {
753852 ForceSpawn(origin?: Vector, angle?: QAngle): Entity[] | undefined;
754853 }
755854
855+ /**
856+ * Move this to control a player's view without moving their pawn.
857+ * @experimental This feature is experimental and may experience breaking changes.
858+ * Please send feedback to CSGOTeamFeedback@valvesoftware.com with "cs_script Feedback" in the subject line.
859+ */
860+ export class CSPlayerCamera extends Entity {
861+ IsEnabled(): boolean;
862+ SetEnabled(enabled: boolean): void;
863+ /** Set to false let a player look around from the camera's position. */
864+ SetIsControllingAngles(controlling: boolean): void;
865+ }
866+
756867 /** @deprecated This enum will be removed in a future update */
757868 export enum CSDamageType { }
758869 }
Update information⌄
Build
24916958
Associated changelist
38299563
Game version
2000888

Found something incorrect?

Report a missing patch note, incorrect file change, or other problem.