03.12.2012, 13:45
pawn Код:
public PeterAC()
{
new weaponid, ammo;
new plname[64], string[256];
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
GetPlayerName(i, plname, sizeof(plname));
if(AntiWeaponHack == 1)
{
if (PlayerGotSpottedRecently[i] == 0)
{
if(ScriptWeaponsUpdated[i] == 0)
{
for (new c = 0; c < 13; c++)
{
GetPlayerWeaponData(i, c, weaponid, ammo);
if (weaponid != 0 && ammo != 0)
{
if (ScriptWeapons[i][c] != weaponid)
{
new weapon[24]; GetWeaponName(weaponid, weapon, 24);
GetPlayerName(i, plname, sizeof(plname));
format(string, sizeof(string), "[AC]: %s (%d) Is possibly Using Weapon Hacks; Use /spec and check him!", plname, i);
SendAdminMessage(COLOR_YELLOW, string);
return 1;
}
}
}
}
}
}