Raised This Month: $ Target: $400
 0% 

Help about HAM_TakeDamage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Hydralisk
Junior Member
Join Date: Jun 2005
Old 07-26-2009 , 06:37   Help about HAM_TakeDamage
Reply With Quote #1

I have a problem about hook the TakeDamage virtual function using HAMSANDWICH, Here is my code:

Code:
plugin_init()
{
	RegisterHam(Ham_TakeDamage,"player","ham_dodamage");
}

public ham_dodamage(victim, idinflictor, idattacker, Float:damage, damagebits)
{
	server_print("victim %d id %d idatt %d damage %f damagebits %d",victim,idinflictor,idattacker, damage, damagebits);

}
the problem is that when I hit a bot, nothing happend, on other word the server did not print the trace message ("victim....").. but when the bot hit me, it generates the trace message. How can i let it take effect to bots? Thanks in advance.
Hydralisk is offline
 



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 18:19.


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