I want to make an Damage Log menu display the weapon used to kill/damage.
Here is the code and I'm not sure if I've done it right:
Get Weapon:
[CODE]function Damagelog:WeaponFromDmg(dmg)
local inf = dmg:GetInflictor()
local wep = nil
if IsValid(inf) then
if inf:IsWeapon() or inf.Projectile then
wep = inf[/CODE]
Display Weapon
[CODE]str_damage = "%killer[%killrole] dealt %dmg damage to %victim[%vicrole] using"..wep.."."[/CODE]
You haven't explained your problem?
I wanted to make sure that I did it right.
Sorry, you need to Log In to post a reply to this thread.