fix multiple vips issue counting on motherzombies
This commit is contained in:
parent
b87be0bfdb
commit
9ed4c43ced
@ -7,6 +7,7 @@
|
||||
#include <zombiereloaded>
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user