Robustify this
This commit is contained in:
parent
7215d129dd
commit
eb200dafc6
|
@ -18,4 +18,17 @@ SWEP.Sound_Fire = {
|
|||
SWEP.Primary.ClipSize = 30
|
||||
SWEP.Delay = ( 60 / 700 )
|
||||
SWEP.DamageClose = 25
|
||||
SWEP.DamageFar = 13
|
||||
SWEP.DamageFar = 13
|
||||
|
||||
SWEP.BubbleSpreadUp = 0.9
|
||||
SWEP.BubbleRecoilUp = 0.9
|
||||
SWEP.BubbleSpreadDown = 0.3
|
||||
SWEP.BubbleRecoilDown = 0.3
|
||||
|
||||
SWEP.SpreadStart = 0
|
||||
SWEP.SpreadEnd = 10
|
||||
|
||||
SWEP.RecoilUp = 55
|
||||
SWEP.RecoilSpeed = 90
|
||||
SWEP.RecoilDistStart = 1
|
||||
SWEP.RecoilDistEnd = 10
|
|
@ -188,6 +188,29 @@ else
|
|||
local attacker = net.ReadEntity()
|
||||
local inflictor = net.ReadEntity()
|
||||
|
||||
chat.AddText( c_attacker, attacker:Nick(), color_white, " [", inflictor:GetPrintName(), "] ", c_victim, victim:Nick(), color_white )
|
||||
local name_victim
|
||||
local name_attacker
|
||||
local name_inflictor
|
||||
if IsValid(victim) then
|
||||
name_victim = victim:Nick()
|
||||
end
|
||||
if IsValid(attacker) then
|
||||
name_attacker = attacker:Nick()
|
||||
end
|
||||
if IsValid(inflictor) then
|
||||
if inflictor.GetPrintName then
|
||||
name_inflictor = inflictor:GetPrintName()
|
||||
else
|
||||
name_inflictor = inflictor:GetClass()
|
||||
end
|
||||
else
|
||||
name_inflictor = "???"
|
||||
end
|
||||
|
||||
if !IsValid( attacker ) then
|
||||
chat.AddText( c_attacker, name_attacker, color_white, " [", name_inflictor, "] ", c_victim, name_victim, color_white )
|
||||
else
|
||||
chat.AddText( c_attacker, name_attacker, color_white, " [", name_inflictor, "] ", c_victim, name_victim, color_white )
|
||||
end
|
||||
end)
|
||||
end
|
Loading…
Reference in New Issue