13.01.2012, 10:07
Hello,i've scripted this small hp/armour anticheat,i do it a try and the server crashes and dont ban.
WTF?I've the timers,and BanLog is to log bans,definied too.
pawn Код:
forward HealthArmourCheat();
public HealthArmourCheat()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new Float:health;
GetPlayerHealth(i,health);
if(health == 100.0)
{
new string[128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
format(string, sizeof(string), "%s has been banned for health hacks. - %d health.", pName,health);
SendClientMessageToAll(0xFF0000FF, string);
BanLog(string);
new str2[64];
format(str2,sizeof str2,"%s", pName);
Blacklist(str2);
new str[128];
format(str,sizeof str,"0,4AC (ID: 505) - %s banned for health hacks. %d health. ",pName,health);
IRC_GroupSay(IRC_Group, EchoChan,str);
new sss[128];
format(sss, sizeof(sss), "You have Been Banned by ANTICHEAT. Reason: Health Hacks - %d health.", health);
SendClientMessage(i,COLOR_LIGHTBLUE, sss);
SendClientMessage(i,COLOR_RED, "To Get Unbanned Post an Unban Request at Our Forums:");
SendClientMessage(i,COLOR_LIGHTRED, "Don't Evade, Otherwise you wont get unbanned.");
BanEx(i, "AntiCheat - HealthHacks");
continue;
}
new Float:armour;
GetPlayerArmour(i,armour);
if(armour == 100.0)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(i, pName, sizeof(pName));
new string[128];
format(string, sizeof(string), "%s has been banned for armour hacks. - %d armour.", pName,armour);
SendClientMessageToAll(0xFF0000FF, string);
BanLog(string);
new str2[24];
format(str2,sizeof str2,"%s", pName);
Blacklist(str2);
new str[128];
format(str,sizeof str,"0,4 AC (ID: 505) - %s banned for armour hacks. %d armour. ",pName,armour);
IRC_GroupSay(IRC_Group, EchoChan,str);
new sss[128];
format(sss, sizeof(sss), "You have Been Banned by ANTICHEAT. Reason: Armour Hacks - %d armour.", armour);
SendClientMessage(i,COLOR_LIGHTBLUE, sss);
SendClientMessage(i,COLOR_RED, "To Get Unbanned Post an Unban Request at Our Forums:");
SendClientMessage(i,COLOR_LIGHTRED, "Don't Evade, Otherwise you wont get unbanned.");
BanEx(i, "AntiCheat - ArmourHacks");
}
}
return 1;
}