22.06.2016, 12:58
Hey.
What I'm trying to do is simple detection for infinite ammo, when I tested it with another person it worked fine.
When it's on server, it detect the infinite ammo but often detects a player without hacks also, so the code I tried is the following:
Where is the problem that script detects a player without hacks also ? :/
What I'm trying to do is simple detection for infinite ammo, when I tested it with another person it worked fine.
When it's on server, it detect the infinite ammo but often detects a player without hacks also, so the code I tried is the following:
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
OldAmmo[playerid] = GetPlayerAmmo(playerid);
SetTimerEx("CheckUnlimitedAmmo", 500, false, "i", playerid);
return 1;
}
public CheckUnlimitedAmmo(playerid)
{
new msg[128];
NewAmmo[playerid] = GetPlayerAmmo(playerid);
if (OldAmmo[playerid] == NewAmmo[playerid]){
format(msg,sizeof(msg),"[AC] Possible infinite ammo hack on %s",GetPlayerNameEx(playerid, ENameType_CharName));
ABroadcast(X11_YELLOW, msg, EAdminFlags_All);
}
return true;