From 434b568a997261ad6f4913e07e87f1dd36622674 Mon Sep 17 00:00:00 2001 From: jenz Date: Wed, 5 Jun 2024 20:16:09 +0200 Subject: [PATCH] added mother zombie exclusion for fakeclients and autismbots in the place where zacade suggested --- FakeClients/scripting/FakeClients.sp | 62 ++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 13 deletions(-) diff --git a/FakeClients/scripting/FakeClients.sp b/FakeClients/scripting/FakeClients.sp index 825df22..5cbb1ea 100755 --- a/FakeClients/scripting/FakeClients.sp +++ b/FakeClients/scripting/FakeClients.sp @@ -1,5 +1,6 @@ #include #include +#include #include #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; + } +}