Posts: 3,351
Threads: 780
Joined: Jan 2010
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));
if(health == 100.0) { reason = "Health"; }
else if(armour == 100.0) { reason = "Armour"; }
format(string,sizeof string,"0,4AC (ID: 505) - %s has been banned for %s hacks. - 100 %s. ",pName,reason,reason);
IRC_GroupSay(IRC_Group, EchoChan,string);
Ban(i);
Blacklist(pName);
new b[128];
format(b, sizeof(b), "%s has been banned for %s hacks. - 100 %s.",pName,reason,reason);
SendClientMessageToAll(0xFF0000FF, b);
BanLog(b);
new sss[128];
format(sss, sizeof(sss), "You have Been Banned by ANTICHEAT. Reason: %s hacks. - 100 %s.", reason,reason);
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.");
TotalACBans++;
}
}
return 1;
}
It doesn't ban,and when he does,the server crashes,that's wrong?
Posts: 1,363
Threads: 14
Joined: Apr 2009
Reputation:
0
it's possibly something in Blacklist or BanLog, add prints in parts after the first if statement, after Blacklist, after IRC_GroupSay, after Ban, after BanLog and after TotalACBans and see where the server crashes, alternatively use the crash detector plugin.
Posts: 3,351
Threads: 780
Joined: Jan 2010
Quote:
Originally Posted by cessil
it's possibly something in Blacklist or BanLog, add prints in parts after the first if statement, after Blacklist, after IRC_GroupSay, after Ban, after BanLog and after TotalACBans and see where the server crashes, alternatively use the crash detector plugin.
|
Well,i adapted this code like the rest of anticheat piece and i don't think the BanLog and Blacklist are the causes of the crashes.BanLog logs the ban in a file (and i've that file),Blacklist is a sort of antievade and logs all (i've that log file too).
Posts: 1,363
Threads: 14
Joined: Apr 2009
Reputation:
0
did you at least try using the prints or using the crash detect plugin
Posts: 3,351
Threads: 780
Joined: Jan 2010
Quote:
Originally Posted by cessil
did you at least try using the prints or using the crash detect plugin
|
Yes,already tried 2 times and it prints what it does,no signal of crash or something..
Posts: 3,351
Threads: 780
Joined: Jan 2010
Quote:
Originally Posted by cessil
what did it print last?
|
%s added to blacklist log.
%s banned.
Updated TotalACBans.
Sent msg to IRC_GroupSay at #IRC_CHANNEL.
Posts: 1,363
Threads: 14
Joined: Apr 2009
Reputation:
0
he should actually run a timer to kick the player, 2 seconds should do it.
so if it prints everything, how do you know its that script that's crashing them?
Posts: 3,351
Threads: 780
Joined: Jan 2010
Quote:
Originally Posted by cessil
he should actually run a timer to kick the player, 2 seconds should do it.
|
Ye,forgot to paste it.
Btw i fixed that,i just need to store the "pName" value in the blacklist file,thanks.