AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Monitoring how much damage an entity takes (https://forums.alliedmods.net/showthread.php?t=56012)

mysticssjgoku4 06-04-2007 12:54

Monitoring how much damage an entity takes
 
Hmm...anyone know of a way to actually get how much an entity is damaged when shot at.
Sort of the same way client_damage works, but for entities being damaged by players.
Would a shot at an entity be considered "touching" it (ex register_touch())?

Thanks in advance.

mogel 06-04-2007 16:23

Re: Monitoring how much damage an entity takes
 
Hi,

http://www.amxmodx.org/funcwiki.php?...mage&go=search

u need the right for your mod

hand, mogel

diamond-optic 06-04-2007 20:32

Re: Monitoring how much damage an entity takes
 
Quote:

Originally Posted by mogel (Post 485682)
Hi,

http://www.amxmodx.org/funcwiki.php?...mage&go=search

u need the right for your mod

hand, mogel


did you even read what he was asking???

...anyway im not sure if theres a way.. i tried to do it myself months ago but couldnt figure anything out and people in the irc channel told me it cant be done..

VEN 06-06-2007 12:21

Re: Monitoring how much damage an entity takes
 
You have to hook pre and post Ham_TakeDamage. Cache amount of entity's health in pre hook and calculate the difference of health in post hook. You can get Ham Sandwich module in Module Coding forums section.


All times are GMT -4. The time now is 10:39.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.