17.02.2014, 01:01
There's no reliable way to script an anti ammo hack.
Even with the latest callback of OnPlayerWeaponShot, there are still problems with the timing of the data (i've tried doing this with a 5s timer check, yet the data was always off by a second, and i've tried to add a +-5 ammo tolerance and it still failed), plus, it wont work with all ammo based weapons.
The closest you can do is to store the Max ammo value you give to the player, then check if the player exceeds that value. However it is not the best method since most of ammo hacks freeze the ammo instead of increasing it.
Even with the latest callback of OnPlayerWeaponShot, there are still problems with the timing of the data (i've tried doing this with a 5s timer check, yet the data was always off by a second, and i've tried to add a +-5 ammo tolerance and it still failed), plus, it wont work with all ammo based weapons.
The closest you can do is to store the Max ammo value you give to the player, then check if the player exceeds that value. However it is not the best method since most of ammo hacks freeze the ammo instead of increasing it.