You can get the attacker from the damageinfo provided in the hook.
[CODE]GM:ScalePlayerDamage( Player ply, number hitgroup, CTakeDamageInfo dmginfo )[/CODE]
That hook returns dmginfo and you can get the attacker through dmginfo:GetAttacker() or dmginfo:GetInflictor().
[QUOTE=Cardcapture1;46216006][CODE]GM:ScalePlayerDamage( Player ply, number hitgroup, CTakeDamageInfo dmginfo )[/CODE]
That hook returns dmginfo and you can get the attacker through dmginfo:GetAttacker() or dmginfo:GetInflictor().[/QUOTE]
dmginfo:GetAttacker().Loadout would work? I have table attached to each player called ply.Loadout, would dmginfo:GetAttacker() work?
[editline]ugh[/editline]
Ugh, of course it didn't work...
Specify what you mean by "didn't work"
You have to make sure that GetAttacker returns a player using [url]http://wiki.garrysmod.com/page/Entity/IsPlayer[/url]
Sorry, you need to Log In to post a reply to this thread.