01.07.2013, 16:41
Okay so there's a anti hack thread
no compiling errors, but there is no hacks activated, and the ammo decreases, still bans
anyone?
pawn Код:
if (HOLDING(KEY_FIRE))
{
ammo[playerid] = GetPlayerAmmo(playerid);
weapon[playerid] = GetPlayerWeapon(playerid);
if(!IsValidWeapon(weapon[playerid])) return 0;
for(new i=0; i<7;i++) // Use any amount of iteration ( 5 or more is recommended)
{
n_ammo[playerid] = GetPlayerAmmo(playerid);
n_weapon[playerid] = GetPlayerWeapon(playerid);
}
if(n_weapon[playerid] == weapon[playerid] && n_ammo[playerid] == ammo[playerid])
{
new str[128];
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
cheatdetect[playerid]++;
format(str, 128, "[ANTI CHEAT ALERT] Cheat Detected: %s(%d). [Reason: Ammo Hack]", pName,playerid);
SendAdminMessage(COLOR_PINK,str);
if(cheatdetect[playerid] > 1)
{
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
format(string,sizeof(string),"[ANTI CHEAT] Anti-Cheat has banned %s(%d). [Reason: Cheats Detected]",pName,playerid);
SendClientMessageToAll(COLOR_PINK,string);
format(string,sizeof(string),"1[ANTI CHEAT] Anti-Cheat has banned %s(%d). [Reason: Cheats Detected]",pName,playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
IRC_GroupSay(gGroupID,IRC_ADMINCHANNEL,string);
format(string, sizeof(string), "~r~BANNED!");
GameTextForPlayer(playerid, string, 3000, 1);
new INI: File = INI_Open(UserPath(playerid));
INI_SetTag(File,"Player's Data");
INI_WriteString(File,"BanReason","Cheats Detected");
INI_Close(File);
PlayerInfo[playerid][pBanned] =1;
SetTimerEx("KickPlayer",1000,false,"i",playerid);
}
}
}
anyone?