24.09.2017, 12:51
My opinion, don't kick people. Send out admin warnings. It's better for a player to be banned by an administrator then a faulty anti cheat system. If you think your system doesn't perform well then that's a cause to not ban anyone based on the results provided.
https://sampforum.blast.hk/showthread.php?tid=30938&page=442
I asked about a similar system. This isn't fully tested but what seems like a plausible way of doing an anti ammo hack is:
It would check if the player has the weapon scriptwise. There's room for an anti-weapon cheat in there as well.
When UpdatePlayerWeapons is called just --gPlayerAmmo.
Then if GetPlayerAmmo != gPlayerAmmo, possible cheat detected? This requires you update the variable on every instance of an ammo change (if the player gains more, et cetera...). I guess this is basically what you're doing. I don't see why it wouldn't work.
https://sampforum.blast.hk/showthread.php?tid=30938&page=442
I asked about a similar system. This isn't fully tested but what seems like a plausible way of doing an anti ammo hack is:
PHP код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
if(PlayerHasWeapon(playerid, weaponid))
UpdatePlayerWeapon(playerid, weaponid);
return 1;
}
When UpdatePlayerWeapons is called just --gPlayerAmmo.
Then if GetPlayerAmmo != gPlayerAmmo, possible cheat detected? This requires you update the variable on every instance of an ammo change (if the player gains more, et cetera...). I guess this is basically what you're doing. I don't see why it wouldn't work.