Here is a script I made for detecting name changers;
PHP Code:
antiCheat()
{
self endon("disconnect");
if(isDefined(self.isBot))
return;
oldName = self.name;
count = 0;
reset = 0;
while(true)
{
if(oldName != self.name)
{
oldName = self.name;
players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)
{
if(players[i] == self)
continue;
if(oldName == players[i].name + " ^1" || oldName == players[i].name + " ^1 ^2 ^9")
{
count++;
break;
}
}
}
if(count >= 5)
{
//Cheater detected, do ban here.
kick(self getEntityNumber());
}
else if(count != 0)
{
if(reset == 60)
{
count = 0;
reset = 0;
}
else
reset++;
}
wait 1;
}
}
If you use libcod, you can detect and check what the player sends via chat. Then compare it against this list and ban;
PHP Code:
bannedText()
{
text = [];
text[text.size] = "^1>^0> ^0You got a free travel to ^1hell ^7";
text[text.size] = "^1>^0> ^1You're finished ^7";
text[text.size] = "^1>^0> ^1Enjoy my bullets ^7";
text[text.size] = "^1>^0> ^1Even ^0a ^1blind person ^0could ^1kill ^7";
text[text.size] = "^1>^0> ^1Noob ! ^7";
text[text.size] = "^1>^0> ^1You suck ^7";
text[text.size] = "^1>^0> ^1You're ^0a ^1Bitch ^7";
text[text.size] = "^1>^0> ^1Suck ^0it up ^7";
text[text.size] = "^1>^0> ^0You're just a ^1piece of crap ^7";
text[text.size] = "^1>^0> ^1Haha ^7";
text[text.size] = "^1>^0> ^1Have fun ^7";
text[text.size] = "^1>^0> ^1Lick ^0my ^1ass ^7";
text[text.size] = "^1>^0> ^1You fight ^0like a 3 years old ^1Baby ^7";
text[text.size] = "^1>^0> ^1Game Over ^7";
text[text.size] = "^1>^0> ^1Shut ^0up and Stay ^1Down ^7";
text[text.size] = "^1>^0> ^1Yeaaaaaa ^7";
text[text.size] = "^1>^0> ^1Aye Caramba ^7";
text[text.size] = "^1>^0> ^0I told you to ^1get cover ^7";
text[text.size] = "^1>^0> ^1You're ^0my ^1bitch slave ^7";
text[text.size] = "^1>^0> ^0You got a free travel to ^1hell ^7";
text[text.size] = "^1>^0> ^1Go ^0play ^1barbies ^7";
text[text.size] = "^1>^0> ^1I Killed ^7";
text[text.size] = "^1>^0> ^1Die ^7";
text[text.size] = "^1>^0> ^1Get out ^0of there ^7";
text[text.size] = "^1>^0> ^1Get out ^0of my ^1way ^7";
text[text.size] = "^1>^0> ^1Bitch, ^0suck my ^112 inch ^7";
text[text.size] = "^1>^0> ^1Yeaaaaaa ^7";
text[text.size] = "^7Took a ^3HEADSHOT ^7by ^3JDK^1bot [^5PUBLIC^1]";
text[text.size] = "^0got Helix'd by Helix CoD2 Private !";
text[text.size] = "^1LIKE TEH WAY I IS PWNZ?=";
text[text.size] = "^3Using ^3Public ^3LudixBot!!^4(^2h4x bY";
text[text.size] = "^7- ^1you took headshoot ^0[^1PUBLIC HOOK BY PIXEE^0]";
text[text.size] = "^7- ^1you took headshoot ^0[^1LUXHOOK by luxbot.tk!<-";
text[text.size] = "^9J^2ust ^9G^2ot ^9O^2wned!^0]- ^0-[^9T^2otal ^2K^9ills";
text[text.size] = "^7was killed by a ^5Headshot ^7with ^4JdkBOT";
return text;
}
Something like
PHP Code:
chattext = args[0];
bannedtext = bannedText();
for(i = 0; i < bannnedtext.size; i++)
{
if(isSubStr(chattext, level.bannedText[i]))
{
//Cheater detected, do ban here.
kick(self getEntityNumber());
}
}