From 208d08402461ef6223d8d08c7f38948b5ed4c31a Mon Sep 17 00:00:00 2001 From: jenz Date: Tue, 14 Apr 2026 15:17:19 +0200 Subject: [PATCH] added low player count feature that gives extra hp and infinite ammo on difficult maps with low population --- AntiNoob/scripting/knockback_low_pop_modifier.sp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/AntiNoob/scripting/knockback_low_pop_modifier.sp b/AntiNoob/scripting/knockback_low_pop_modifier.sp index 98e4267..63b7b8a 100644 --- a/AntiNoob/scripting/knockback_low_pop_modifier.sp +++ b/AntiNoob/scripting/knockback_low_pop_modifier.sp @@ -42,7 +42,7 @@ public void OnMapStart() { //Decided for now to exclude MaxPlayers //MaxTime, MinTime, MinPlayers, CooldownTime, MinHoursAvg - if (GetMapMaxTime(map) != 0 || GetMapMinTime(map) != 0 || GetMapMinPlayers(map) != 0 /*|| GetMapMaxPlayers(map) != 0*/ || GetMapCooldownTime(map) != 0 + if (GetMapMaxTime(map) != 0 || GetMapMinTime(map) != 0 || GetMapMinPlayers(map) != 0 /*|| GetMapMaxPlayers(map) != 0*/ || GetMapCooldownTime(map) > 60 || GetMapMinHoursAvg(map) != 0) { g_bDoingMapTouristMode = true; @@ -73,13 +73,10 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) else if(knockback_increase < 1.0) knockback_increase = 1.0 - if (knockback_increase > 1.0) + if (knockback_increase > 1.0 || (g_bDoingMapTouristMode && active_player_count < 18)) { if (g_bDoingMapTouristMode) { - PrintToChatAll("LOW POP ON DIFFICULT MAP: ENABLING INFINITE AMMO AND 500 HP FOR CT"); - PrintToChatAll("LOW POP ON DIFFICULT MAP: ENABLING INFINITE AMMO AND 500 HP FOR CT"); - PrintToChatAll("LOW POP ON DIFFICULT MAP: ENABLING INFINITE AMMO AND 500 HP FOR CT"); CreateTimer(3.0, SetHealthOnCT); } else @@ -104,6 +101,9 @@ public void OnRoundStart(Event hEvent, const char[] sEvent, bool bDontBroadcast) public Action SetHealthOnCT(Handle timer) { + PrintToChatAll("LOW POP ON DIFFICULT MAP: ENABLING INFINITE AMMO AND 500 HP FOR CT"); + PrintToChatAll("LOW POP ON DIFFICULT MAP: ENABLING INFINITE AMMO AND 500 HP FOR CT"); + PrintToChatAll("LOW POP ON DIFFICULT MAP: ENABLING INFINITE AMMO AND 500 HP FOR CT"); ServerCommand("sm_iammo @all 1"); ServerCommand("sm_hp @ct 500"); return Plugin_Handled;