AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hostage damage (https://forums.alliedmods.net/showthread.php?t=126201)

rcoder 05-06-2010 15:44

Hostage damage
 
Hi, i try to catch how many damage player has been done to a hostage and i found only this code:

Code:

#include <amxmodx>
#include <hamsandwich>
 
public plugin_init()
{
RegisterHam(Ham_Takedamage, "hostage_entity", "hostTakeDamage")
}
 
public hostTakeDamage(iHostage, iInflictor, iAttacker, Float:flDamage, iDamageType)
{
  if( ExecuteHam(Ham_IsPlayer, iAttacker) )
  {
SetHamParamFloat(4, 0.0)
      return HAM_HANDLED
}
  return HAM_IGNORED
}

can i catch it without HAM ? For example, with logevent

Code:

register_event("TextMsg", "TextMsg_Injured_Hostage", "b", "1=4", "2=#Injured_Hostage")
thanks

Arkshine 05-06-2010 15:50

Re: Hostage damage
 
Why without Ham ? What's the problem to use it ?

wrecked_ 05-06-2010 15:56

Re: Hostage damage
 
That Ham registry wouldn't even work.

Arkshine 05-06-2010 16:21

Re: Hostage damage
 
There is a small typo, Ham_Takedamage -> Ham_TakeDamage and it will work without problems.

rcoder 05-06-2010 17:56

Re: Hostage damage
 
ok when, i will be use ham .. thanks anyway :)


All times are GMT -4. The time now is 03:40.

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