From e28e3338185bba8750bb5251935ab36c02e23af1 Mon Sep 17 00:00:00 2001 From: haooy <45737655+xhaooy@users.noreply.github.com> Date: Thu, 28 Aug 2025 03:07:39 +0200 Subject: [PATCH] Add Pause zone functionality Add Pause zone functionality --- addons/sourcemod/scripting/shavit-zones.sp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/addons/sourcemod/scripting/shavit-zones.sp b/addons/sourcemod/scripting/shavit-zones.sp index 9836c447..8d4a233e 100644 --- a/addons/sourcemod/scripting/shavit-zones.sp +++ b/addons/sourcemod/scripting/shavit-zones.sp @@ -1015,6 +1015,7 @@ bool JumpToZoneType(KeyValues kv, int type, int track) {"Speedmod", ""}, {"No Jump", ""}, {"Autobhop", ""}, + {"Pause", ""}, }; char key[4][50]; @@ -2824,6 +2825,7 @@ public int MenuHandler_HookZone_Editor(Menu menu, MenuAction action, int param1, | (1 << Zone_Speedmod) | (1 << Zone_NoJump) | (1 << Zone_Autobhop) + | (1 << Zone_Pause) // ZoneForm_trigger_teleport , (1 << Zone_End) | (1 << Zone_Respawn) @@ -5425,6 +5427,15 @@ public void StartTouchPost(int entity, int other) SetVariantString(s); AcceptEntityInput(entity, "ModifySpeed", other, entity, 0); } + + case Zone_Pause: + { + if(Shavit_GetTimerStatus(other) != Timer_Stopped) + { + Shavit_PauseTimer(other); + //Should we print? + } + } } gI_InsideZone[other][track] |= (1 << type); @@ -5480,6 +5491,11 @@ public void EndTouchPost(int entity, int other) AcceptEntityInput(entity, "ModifySpeed", other, entity, 0); } + if (type == Zone_Pause) + { + Shavit_ResumeTimer(other); + } + Call_StartForward(gH_Forwards_LeaveZone); Call_PushCell(other); Call_PushCell(type);