26.05.2018, 01:22
(
Последний раз редактировалось Banana_Ghost; 29.05.2018 в 16:25.
)
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:
UPDATE: May 29th, 2018:
If you wish to use OnPlayerTakeDamage for players that aren't shooting, but you want them detected. Do:
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:
Pastebin Link
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.
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
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(suspectid, involvedid, weaponid, Float:damageamt)
{
return 1; // This callback doesn't handle returns
}