Raised This Month: $51 Target: $400
 12% 

Hooking OnTakeDamage


Post New Thread Reply   
 
Thread Tools Display Modes
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 09-10-2009 , 10:19   Re: Hooking OnTakeDamage
Reply With Quote #11

Fredd, I'm wondering is GetAttacker() still working for you in CSS? I ask because I can't use it without crashes but I notice some of the hacks plugins using SetDamage etc without problem. Did they edit the headers to match the games or what happened that I'm missing??
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 09-10-2009 , 22:34   Re: Hooking OnTakeDamage
Reply With Quote #12

I actually just did a CSS extension for someone yesterday that hooks OnTakeDamage. I had to edit the headers a bit, but mainly just to add an include file and change some stuff from protected to public. Other than that it worked fine.
__________________
CrimsonGT is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 09-11-2009 , 06:53   Re: Hooking OnTakeDamage
Reply With Quote #13

That's the lazy way indeed
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 09-13-2009 , 13:04   Re: Hooking OnTakeDamage
Reply With Quote #14

Crimson, I'm guessing that's the knife damage extension ;) ? I incorporate it into ZM for the guy! That napalm extension screws with IPlayerInfo::GetWeaponName so I had to write a work around.

Tsunami, what's the lazy way??

And yeah, after some messing I found the problem was something else I'd changed that was messing up haha. The functions shouldn't be trusted but the variables are fine once changed to public
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 09-13-2009 , 17:25   Re: Hooking OnTakeDamage
Reply With Quote #15

Changing the SDK is the lazy way, the proper way I believe is making your own CTakeDamageInfo class (extending the SDK one), with the functions BAILOPAN described to get the attacker and inflictor, but I haven't gotten that to work yet.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 09-14-2009 , 07:27   Re: Hooking OnTakeDamage
Reply With Quote #16

Quote:
Originally Posted by DJ Tsunami View Post
Changing the SDK is the lazy way, the proper way I believe is making your own CTakeDamageInfo class (extending the SDK one), with the functions BAILOPAN described to get the attacker and inflictor, but I haven't gotten that to work yet.
Haha I've already done that, there's a fine example of it in DukeHacks I believe
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 09-14-2009 , 08:23   Re: Hooking OnTakeDamage
Reply With Quote #17

DukeHacks still requires an edited SDK, so L Duke's CTakeDamageInfoHack seems useless to me.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 09-14-2009 , 10:30   Re: Hooking OnTakeDamage
Reply With Quote #18

I haven't tried this in the OB engine, but I know that I couldn't get that information until I grabbed the gEntList address.
Keeper is offline
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 09-14-2009 , 11:21   Re: Hooking OnTakeDamage
Reply With Quote #19

Quote:
Originally Posted by DJ Tsunami View Post
DukeHacks still requires an edited SDK, so L Duke's CTakeDamageInfoHack seems useless to me.
Not if you extend the functions...
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 09-14-2009 , 18:29   Re: Hooking OnTakeDamage
Reply With Quote #20

Which he didn't do properly, still requiring the SDK to be edited.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami 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 15:44.


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