This anticheat make crashes server -
Face9000 - 13.01.2012
Hello,i've scripted this small hp/armour anticheat,i do it a try and the server crashes and dont ban.
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;
}
WTF?I've the timers,and BanLog is to log bans,definied too.
Re: This anticheat make crashes server -
mineralo - 13.01.2012
I'm not sure but replace "continue" you just need to write return1; and at amour too, both will work if you write return 1; maybe that was your problem, try
Re: This anticheat make crashes server -
davve95 - 13.01.2012
I miss read so my message deleted.
Re: This anticheat make crashes server -
Voldemort - 13.01.2012
Try as this
pawn Код:
forward HealthArmourCheat();
public HealthArmourCheat()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new Float:health,Float:armour;;
GetPlayerHealth(i,health);
GetPlayerArmour(i,armour);
if(health == 100.0 || armour == 100.0)
{
new string[128],pName[MAX_PLAYER_NAME],reason[32];
GetPlayerName(i, pName, sizeof(pName));
Blacklist(pName);
if(health == 100.0) { reason = "Health"; }
else if(armour == 100.0) { reason = "Armour"; }
format(string,sizeof string,"4AC (ID: 505) - %s has been banned for %s hacks. - 100 %s. ",pName,reason,reason);
IRC_GroupSay(IRC_Group, EchoChan,string);
format(string, sizeof(string), "%s has been banned for %s hacks. - 100 %s.",reason,reason);
SendClientMessageToAll(0xFF0000FF, string);
BanLog(string);
format(string, sizeof(string), "You have Been Banned by ANTICHEAT. Reason: %s hacks. - 100 %s.", reason,reason);
SendClientMessage(i,COLOR_LIGHTBLUE, string);
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.");
format(string, sizeof(string), "AntiCheat - %s Hack.",reason);
BanEx(i,string);
}
}
return 1;
}
If its still crash problem isnt here, but in functions you use