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)