Robustify this

This commit is contained in:
Fesiug 2023-12-22 09:23:15 -05:00
parent 7215d129dd
commit eb200dafc6
2 changed files with 38 additions and 2 deletions

View File

@ -19,3 +19,16 @@ SWEP.Primary.ClipSize = 30
SWEP.Delay = ( 60 / 700 ) SWEP.Delay = ( 60 / 700 )
SWEP.DamageClose = 25 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

View File

@ -188,6 +188,29 @@ else
local attacker = net.ReadEntity() local attacker = net.ReadEntity()
local inflictor = 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)
end end