From 9a4b654ba8fe6f449a6279af0e844e15c3a2918d Mon Sep 17 00:00:00 2001 From: dogan Date: Sat, 8 Aug 2020 21:56:59 +0200 Subject: [PATCH] ZombieManager: strip sm_zhp and fix retarded mzombie bug --- ZombieManager/scripting/ZombieManager.sp | 28 ++++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/ZombieManager/scripting/ZombieManager.sp b/ZombieManager/scripting/ZombieManager.sp index 58bfaf18..341be5c4 100644 --- a/ZombieManager/scripting/ZombieManager.sp +++ b/ZombieManager/scripting/ZombieManager.sp @@ -12,8 +12,8 @@ bool g_bTestRound; bool g_bAdminTestRound; bool g_bMotherZM[MAXPLAYERS + 1] = { false, ...}; -bool g_bZHP[MAXPLAYERS + 1] = { false, ... }; -Handle g_hCookieZHP = null; +/*bool g_bZHP[MAXPLAYERS + 1] = { false, ... }; +Handle g_hCookieZHP = null;*/ int g_iZHPMax[MAXPLAYERS + 1]; int g_iZShield[MAXPLAYERS + 1]; bool g_bShield; @@ -54,9 +54,9 @@ public void OnPluginStart() g_bShield = cvar.BoolValue; delete cvar; - RegConsoleCmd("sm_zhp", OnToggleZHP, "Toggle blocking Zombie HP and Shield display"); + /*RegConsoleCmd("sm_zhp", OnToggleZHP, "Toggle blocking Zombie HP and Shield display"); g_hCookieZHP = RegClientCookie("zhp_blocked", "are zombie hp and shield display blocked", CookieAccess_Protected); - SetCookieMenuItem(MenuHandler_CookieMenu, 0, "Zombie HP Shield Display"); + SetCookieMenuItem(MenuHandler_CookieMenu, 0, "Zombie HP Shield Display");*/ AutoExecConfig(true, "plugin.ZombieManager"); @@ -92,7 +92,7 @@ public void OnMapStart() g_bShield = GetConVarBool(FindConVar("sm_zombieshield")); } -public Action OnToggleZHP(int client, int args) +/*public Action OnToggleZHP(int client, int args) { ToggleZHP(client); return Plugin_Handled; @@ -104,9 +104,9 @@ public void ToggleZHP(int client) SetClientCookie(client, g_hCookieZHP, g_bZHP[client] ? "1" : ""); CPrintToChat(client, "{green}[ZR] {yellow}%s", g_bZHP[client] ? "Zombie HP and Shield display disabled." : "Zombie HP and Shield display enabled."); -} +}*/ -public void OnClientCookiesCached(int client) +/*public void OnClientCookiesCached(int client) { char sBuffer[2]; @@ -115,16 +115,16 @@ public void OnClientCookiesCached(int client) g_bZHP[client] = true; else g_bZHP[client] = false; -} +}*/ public void OnClientDisconnect(int client) { - g_bZHP[client] = false; + //g_bZHP[client] = false; g_iZHPMax[client] = 0; g_iZShield[client] = 0; } -public void ShowSettingsMenu(int client) +/*public void ShowSettingsMenu(int client) { Menu menu = new Menu(MenuHandler_MainMenu); @@ -177,7 +177,7 @@ public int MenuHandler_MainMenu(Menu menu, MenuAction action, int client, int se delete menu; } } -} +}*/ public void Cvar_AFKTime(ConVar convar, const char[] oldValue, const char[] newValue) { @@ -277,7 +277,7 @@ public bool Filter_Motherzombies(const char[] sPattern, Handle hClients, int cli { for(int i = 1; i <= MaxClients; i++) { - if(IsClientInGame(i) && !IsFakeClient(i) && GetClientTeam(client) == CS_TEAM_T) + if(IsClientInGame(i) && !IsFakeClient(i) && GetClientTeam(i) == CS_TEAM_T) { if(g_bMotherZM[i]) PushArrayCell(hClients, i); @@ -300,7 +300,7 @@ public Action Command_DisplayMotherzombies(int client, int args) for(int i = 1; i <= MaxClients; i++) { - if(IsClientInGame(i) && !IsFakeClient(i) && GetClientTeam(client) == CS_TEAM_T) + if(IsClientInGame(i) && !IsFakeClient(i) && GetClientTeam(i) == CS_TEAM_T) { if(g_bMotherZM[i]) { @@ -475,7 +475,7 @@ public Action Timer_UpdateHintMessage(Handle timer) bool bVote = IsVoteInProgress(); - if(g_bZHP[i] || bVote) + if(/*g_bZHP[i] || */bVote) continue; if(g_iZShield[i] <= 0)