05.12.2012, 01:19
You could break the loop when you've found the cheater anyway, as there's no need to check through the rest of the weapons.
Like this:
Like this:
pawn Код:
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);
break;
}
}
}