onplayershoot
#1

is there a way to detect if the player shoot and see if his ammo went dont i trying to create custom anti cheat
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage

https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage
Reply
#3

Add this to OnPlayerDeath:

Quote:

if(GetPlayerWeapon(killerid) == 38 ) Ban(killerid); //set the id to the weapon which your server doesn't allow

That's actually the code of anti cheating of weapon hack, not ammo hack..

For ammo hack what you can do is save the player weapon data for when he spawned and check it again after he killed someone..if the ammo is still the same then that means he is using ammo hack.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)