From 8405bc52f2c199da8a1bf1f247687c85cfe4e1a7 Mon Sep 17 00:00:00 2001 From: christian Date: Sun, 15 Aug 2021 18:41:17 +0200 Subject: [PATCH] added filter from boss --- .../scripting/unloze_ConsoleMessages.sp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/unloze_ConsoleMessages/scripting/unloze_ConsoleMessages.sp b/unloze_ConsoleMessages/scripting/unloze_ConsoleMessages.sp index c7f5aa49..a54b3551 100644 --- a/unloze_ConsoleMessages/scripting/unloze_ConsoleMessages.sp +++ b/unloze_ConsoleMessages/scripting/unloze_ConsoleMessages.sp @@ -85,6 +85,22 @@ public void Event_RoundStart(Handle event, const char[] name, bool dontBroadcast roundStartedTime = GetEngineTime(); } +public bool CheckString(const char[] string) +{ + char Blacklist[][] = { + "recharge", "recast", "cooldown", "cool" + }; + for (int i = 0; i < sizeof(Blacklist); i++) + { + if (StrContains(string, Blacklist[i], false) != -1) + { + return true; + } + } + return false; +} + + public Action PointServerCommandForward(const char[] sCommand) { if (!strncmp("say", sCommand, 3, false)) @@ -98,7 +114,7 @@ public Action PointServerCommandForward(const char[] sCommand) sMessage[i] = sCommand[i + 4]; i++; } - if (StrContains(sMessage, "sec", false) != -1) + if (StrContains(sMessage, "sec", false) != -1 && !CheckString(sMessage)) { int indexTracker = -1 int endIndexTracker = -1