Raised This Month: $ Target: $400
 0% 

Help about HAM_TakeDamage


Post New Thread Reply   
 
Thread Tools Display Modes
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
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 07-26-2009 , 06:40   Re: Help about HAM_TakeDamage
Reply With Quote #2

What bot exactly? PODBot or just some fake client (if so, read below)?
Code:
RegisterHam(Ham_TakeDamage,"player","ham_dodamage");
Replace "player" with an entity classname, that your bot has.
__________________
hleV is offline
Hydralisk
Junior Member
Join Date: Jun 2005
Old 07-26-2009 , 06:42   Re: Help about HAM_TakeDamage
Reply With Quote #3

Hello helv. It's not podbot, but the CS 1.6 BOT, I don't know if it should be called fake client. I tried to get the the bot's classname, It is "player"...

Last edited by Hydralisk; 07-26-2009 at 06:45.
Hydralisk is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 07-26-2009 , 06:43   Re: Help about HAM_TakeDamage
Reply With Quote #4

You mean ZBot? It's not supported here since they're illegal if used with CS 1.6. BTW are you using Steam?
__________________
hleV is offline
Hydralisk
Junior Member
Join Date: Jun 2005
Old 07-26-2009 , 06:49   Re: Help about HAM_TakeDamage
Reply With Quote #5

No Steam I think. You discovered it. My steam always crashes for unknown reasons so I have to find an alternative.
Hydralisk is offline
Hydralisk
Junior Member
Join Date: Jun 2005
Old 07-26-2009 , 06:54   Re: Help about HAM_TakeDamage
Reply With Quote #6

Thx, I shall have to fight another way which have a same funtion.
Hydralisk 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 18:19.


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