Raised This Month: $ Target: $400
 0% 

Hostage damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rcoder
Junior Member
Join Date: Oct 2008
Location: Kharkov, Ukraine, Europe
Old 05-06-2010 , 15:44   Hostage damage
Reply With Quote #1

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
rcoder is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-06-2010 , 15:50   Re: Hostage damage
Reply With Quote #2

Why without Ham ? What's the problem to use it ?
__________________
Arkshine is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 05-06-2010 , 15:56   Re: Hostage damage
Reply With Quote #3

That Ham registry wouldn't even work.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 05-06-2010 , 16:21   Re: Hostage damage
Reply With Quote #4

There is a small typo, Ham_Takedamage -> Ham_TakeDamage and it will work without problems.
__________________
Arkshine is offline
rcoder
Junior Member
Join Date: Oct 2008
Location: Kharkov, Ukraine, Europe
Old 05-06-2010 , 17:56   Re: Hostage damage
Reply With Quote #5

ok when, i will be use ham .. thanks anyway
rcoder is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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