From 0f45999d7208f9288e6b38b6286a3f2a37e7c3dc Mon Sep 17 00:00:00 2001 From: aura Date: Sun, 26 Apr 2026 21:30:30 +0200 Subject: aa --- source/sourcemod/scripting/gokz-core/teleports.sp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source/sourcemod/scripting/gokz-core/teleports.sp') diff --git a/source/sourcemod/scripting/gokz-core/teleports.sp b/source/sourcemod/scripting/gokz-core/teleports.sp index 764fc6e..499a198 100644 --- a/source/sourcemod/scripting/gokz-core/teleports.sp +++ b/source/sourcemod/scripting/gokz-core/teleports.sp @@ -258,6 +258,15 @@ void TeleportToCheckpoint(int client) bool CanTeleportToCheckpoint(int client, bool showError = false) { + int warmup = GameRules_GetProp( "m_bWarmupPeriod" ); + if( !warmup ) { + if( showError ) { + GOKZ_PrintToChat(client, true, "%s", "Teleporting is only allowed during warmup"); + GOKZ_PlayErrorSound(client); + } + return false; + } + // Safeguard Check if (GOKZ_GetCoreOption(client, Option_Safeguard) == Safeguard_EnabledPRO && GOKZ_GetTimerRunning(client) && GOKZ_GetValidTimer(client) && GOKZ_GetTeleportCount(client) == 0) { @@ -399,6 +408,13 @@ bool CanNextCheckpoint(int client, bool showError = false) bool CanTeleportToStart(int client, bool showError = false) { + int warmup = GameRules_GetProp( "m_bWarmupPeriod" ); + if( !warmup ) { + GOKZ_PrintToChat(client, true, "%s", "Teleporting is only allowed during warmup"); + GOKZ_PlayErrorSound(client); + return false; + } + // Safeguard Check if (GOKZ_GetCoreOption(client, Option_Safeguard) > Safeguard_Disabled && GOKZ_GetTimerRunning(client) && GOKZ_GetValidTimer(client)) { -- cgit v1.2.3