From 9ed4c43ced5e6114ac98d6a86a4ba0b76dd35277 Mon Sep 17 00:00:00 2001 From: DoganGFL Date: Wed, 21 Nov 2018 17:08:31 +0100 Subject: [PATCH] fix multiple vips issue counting on motherzombies --- VIPMode/scripting/VIPMode.sp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/VIPMode/scripting/VIPMode.sp b/VIPMode/scripting/VIPMode.sp index 9eb9f431..a2f0490b 100644 --- a/VIPMode/scripting/VIPMode.sp +++ b/VIPMode/scripting/VIPMode.sp @@ -7,6 +7,7 @@ #include int g_iVIPClient = -1; +bool g_bmotherInfect = false; public Plugin myinfo = { @@ -43,8 +44,9 @@ public Action WhoIsVIP(int client, int args) public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, bool respawnOverride, bool respawn) { - if(motherInfect) + if(motherInfect && g_bmotherInfect == false) { + g_bmotherInfect = true; CreateTimer(5.0, SelectVIP, _, TIMER_FLAG_NO_MAPCHANGE); } } @@ -52,11 +54,13 @@ public void ZR_OnClientInfected(int client, int attacker, bool motherInfect, boo public Action OnRoundStart(Event event, const char[] name, bool dontBroadcast) { g_iVIPClient = -1; + g_bmotherInfect = false; } public Action OnRoundEnd(Event event, const char[] name, bool dontBroadcast) { g_iVIPClient = -1; + g_bmotherInfect = false; } public Action SelectVIP(Handle timer)