[Include] Damage Mod Detection
#1

This include detects damage mods. Damage mods are basically a cheat that allows you to take a lower damage than the weapon actually gives, thus keeping you alive longer.

The way this script detects players damage modding is pretty interesting. It checks the shooter for the amount of damage they would want to take from another player. Meaning if I had damage mods and I shot another player, it would call the callback because I'm damage modding.

OnPlayerGiveDamage returns the following in the callback:
  • playerid - The player that issued the damage.
  • damagedid - The player that is supposed to take the damage.
  • amount - The amount of damage your character wants to take.
  • weaponid - The weapon that is giving the damage.
  • bodypart - The bodypart the damage is being given to.
Basically, it works without the player having damage mods being shot. All the player has to do is shoot someone while having them and they'll be detected.

UPDATE: May 29th, 2018:
If you wish to use OnPlayerTakeDamage for players that aren't shooting, but you want them detected. Do:
PHP код:
#define DM_USE_OPTD 
before including this script.

The callback below has been updated to include the person that was involved with the detection as well.

Add this to your script and from there decide what to do with the damage modder:
PHP код:
public OnPlayerDamageModding(suspectidinvolvedidweaponidFloat:damageamt)
{
    return 
1// This callback doesn't handle returns

Pastebin Link
Reply


Messages In This Thread
Damage Mod Detection - by Banana_Ghost - 26.05.2018, 01:22
Re: Damage Mod Detection - by RogueDrifter - 26.05.2018, 02:05
Re: Damage Mod Detection - by Kar - 26.05.2018, 04:07
Re: Damage Mod Detection - by tungki - 26.05.2018, 04:15
Re: Damage Mod Detection - by Banana_Ghost - 26.05.2018, 04:42
Re: Damage Mod Detection - by Banana_Ghost - 29.05.2018, 14:00
Re: Damage Mod Detection - by RogueDrifter - 29.05.2018, 15:43
Re: Damage Mod Detection - by Banana_Ghost - 29.05.2018, 16:22

Forum Jump:


Users browsing this thread: 1 Guest(s)