22.06.2015, 07:21
PHP код:
// top
new gTimesHacked[MAX_PLAYERS];
public BadCheck()
{
new weap, string[228], string3[256], pname[MAX_PLAYER_NAME]; //
for(new i, b = GetMaxPlayers(); i < b; i++) //
{
GetPlayerName(i, pname, sizeof(pname));
weap = GetPlayerWeapon(i);
for(new w; w < sizeof(BadWeapons); w++)
{
if(pInfo[i][pAdmin] < 1)
{
if(weap == BadWeapons[w])
{
gTimesHacked[i]++;
if(gTimesHacked[i] > 1)
{
Kick(i);
}
format(string,sizeof(string),"SERVER ANTI-CHEAT: %s is trying to hack weapons.", pname);
SendMessageToAdmins(RED,string);
ResetPlayerWeapons(i);
}
}
}
}
return 1;
}