Raised This Month: $ Target: $400
 0% 

get_user_attacker(index,...)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ingram
Veteran Member
Join Date: May 2004
Old 08-31-2004 , 23:06   get_user_attacker(index,...)
Reply With Quote #1

is there anotehr way of getting the attacker on a damage event? it doesn't seem to work on battlegrounds

should i just readdata and output to see if any match the attacker?
Ingram is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 09-01-2004 , 07:24  
Reply With Quote #2

That would be a good idea
__________________
hello, i am pm
PM is offline
mahnsawce
Senior Member
Join Date: Apr 2004
Location: internet
Old 09-01-2004 , 08:48  
Reply With Quote #3

You could try that, or maybe battlegrounds sets the dmg_inflictor entvar setting properly.

Try checking the
Code:
entity_get_edict(idPlayer,EV_ENT_dmg_inflictor)
setting after the damage event is sent. There's a chance that this value will be either the player who caused the damage, or the item that caused the damage (rifle, etc). If it appears to be a gun entity then do this
Code:
entity_get_edict(idWeapon,EV_ENT_owner)
and that should be the person who caused the damage.
mahnsawce is offline
Ingram
Veteran Member
Join Date: May 2004
Old 09-01-2004 , 14:19  
Reply With Quote #4

the mod is open source, so i just searched dmg_inflictor and from what i understand of it, mahnsawce has it right on, EV_ENT_dmg_inflictor is the weapon that they were killed by

edit: ok it worked, thx
Ingram is offline
Phase
New Member
Join Date: Dec 2004
Old 12-23-2004 , 00:32  
Reply With Quote #5

I am attempting to convert a mirror damage plugin to BG, what exactly did you do JJkiller? I am having problems It either wont have mirror damage or it will damage you even if you attack the enemy

*edit* I got it to work nvm.
Phase is offline
Send a message via AIM to Phase Send a message via MSN to Phase
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 17:27.


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