added mother zombie exclusion for fakeclients and autismbots in the place where zacade suggested
This commit is contained in:
parent
b0c6be592d
commit
434b568a99
@ -1,5 +1,6 @@
|
||||
#include <sourcemod>
|
||||
#include <sdktools>
|
||||
#include <zombiereloaded>
|
||||
#include <cstrike>
|
||||
|
||||
#pragma semicolon 1
|
||||
@ -11,6 +12,9 @@ ArrayList g_hNames;
|
||||
bool g_bFakePopulation[MAXPLAYERS + 1];
|
||||
bool g_bMapEnded;
|
||||
|
||||
//check if autismbot
|
||||
bool is_bot_player[MAXPLAYERS + 1];
|
||||
|
||||
int g_iBaseLatency[MAXPLAYERS + 1];
|
||||
int g_iLatency[MAXPLAYERS + 1];
|
||||
|
||||
@ -311,20 +315,21 @@ public void OnClientConnected(int client)
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
public void OnClientDisconnect(int client)
|
||||
{
|
||||
if (client > 0)
|
||||
{
|
||||
if(g_bFakePopulation[client])
|
||||
{
|
||||
g_bFakePopulation[client] = false;
|
||||
g_iLatency[client] = 0;
|
||||
}
|
||||
if (client > 0)
|
||||
{
|
||||
if(g_bFakePopulation[client])
|
||||
{
|
||||
g_bFakePopulation[client] = false;
|
||||
g_iLatency[client] = 0;
|
||||
}
|
||||
|
||||
if (!g_bCheckRequested && !IsFakeClient(client))
|
||||
{
|
||||
RequestFrame(CheckPopulation);
|
||||
g_bCheckRequested = true;
|
||||
}
|
||||
}
|
||||
if (!g_bCheckRequested && !IsFakeClient(client))
|
||||
{
|
||||
RequestFrame(CheckPopulation);
|
||||
g_bCheckRequested = true;
|
||||
}
|
||||
is_bot_player[client] = false;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
@ -486,3 +491,34 @@ public void OnGameFrame()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Action ZR_OnClientMotherZombieEligible(int client)
|
||||
{
|
||||
if (g_bFakePopulation[client] || is_bot_player[client])
|
||||
return Plugin_Handled;
|
||||
|
||||
return Plugin_Continue;
|
||||
}
|
||||
|
||||
public void OnClientPostAdminCheck(int client)
|
||||
{
|
||||
is_bot_player[client] = false;
|
||||
char auth[50];
|
||||
GetClientAuthId(client, AuthId_Engine, auth, sizeof(auth));
|
||||
if (StrEqual("[U:1:1221121532]", auth, false) || StrEqual("STEAM_0:0:610560766", auth, false))
|
||||
{
|
||||
is_bot_player[client] = true;
|
||||
}
|
||||
if (StrEqual("[U:1:408797742]", auth, false) || StrEqual("STEAM_0:0:204398871", auth, false))
|
||||
{
|
||||
is_bot_player[client] = true;
|
||||
}
|
||||
if (StrEqual("[U:1:1036189204]", auth, false) || StrEqual("STEAM_0:0:518094602", auth, false))
|
||||
{
|
||||
is_bot_player[client] = true;
|
||||
}
|
||||
if (StrEqual("[U:1:120378081]", auth, false) || StrEqual("STEAM_0:1:60189040", auth, false))
|
||||
{
|
||||
is_bot_player[client] = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user