attempt to fix rainbow lennies

FAILED
This commit is contained in:
DoganGFL 2018-11-30 16:45:14 +01:00
parent a7170b133a
commit 75fb3b22f5

View File

@ -5,10 +5,11 @@
#include <zombiereloaded>
#include <cstrike>
#include <ccc>
#include <multicolors>
bool g_bHideLennies[MAXPLAYERS + 1] = { false, ... };
char g_cLennies[19][] = {"( ͡° ͜ʖ ͡°)", "(° ͜ʖ °)", "( ͝͠°͜ل͝͠°)", "( ͡° ͜ ͡°)", "( ͡°╭͜ʖ╮͡° )", "( ͠° ͜ʖ ͡°)", "( ° ͜ʖ °)", "(╯°□°)╯", "_(ツ)_", "_ツ_", "( ̿°̿ ͜ل͜ ̿°̿ )", "( ͡", "( ͠", "( ͝", "( °", "", "ಠ_ಠ", "͡°", "°͡"};
char g_cLennies[20][] = {"( ͡° ͜ʖ ͡°)", "͜ʖ", "(° ͜ʖ °)", "( ͝͠°͜ل͝͠°)", "( ͡° ͜ ͡°)", "( ͡°╭͜ʖ╮͡° )", "( ͠° ͜ʖ ͡°)", "( ° ͜ʖ °)", "(╯°□°)╯", "_(ツ)_", "_ツ_", "( ̿°̿ ͜ل͜ ̿°̿ )", "( ͡", "( ͠", "( ͝", "( °", "", "ಠ_ಠ", "͡°", "°͡"};
public Plugin myinfo =
{
@ -26,11 +27,16 @@ public void OnPluginStart()
public Action CCC_OnChatMessage(int client, int author, const char[] message)
{
for(int i = 0; i < 19; i++)
char buffer[192];
strcopy(buffer, sizeof(buffer), message);
CRemoveTags(buffer, 192);
for(int i = 0; i < 20; i++)
{
if(g_bHideLennies[client] && StrContains(message, g_cLennies[i], false) != -1)
if(g_bHideLennies[client] && StrContains(buffer, g_cLennies[i], false) != -1)
{
return Plugin_Handled;
return Plugin_Handled;
}
}
return Plugin_Continue;