AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   get_user_attacker(index,...) (https://forums.alliedmods.net/showthread.php?t=5431)

Ingram 08-31-2004 23:06

get_user_attacker(index,...)
 
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?

PM 09-01-2004 07:24

That would be a good idea :up: :D

mahnsawce 09-01-2004 08:48

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.

Ingram 09-01-2004 14:19

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

Phase 12-23-2004 00:32

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

*edit* I got it to work nvm.


All times are GMT -4. The time now is 17:27.

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