diff --git a/gamemodes/copsnrobbers/entities/weapons/cnr_ak47.lua b/gamemodes/copsnrobbers/entities/weapons/cnr_ak47.lua index 609f8bd..943ecd1 100644 --- a/gamemodes/copsnrobbers/entities/weapons/cnr_ak47.lua +++ b/gamemodes/copsnrobbers/entities/weapons/cnr_ak47.lua @@ -18,4 +18,17 @@ SWEP.Sound_Fire = { SWEP.Primary.ClipSize = 30 SWEP.Delay = ( 60 / 700 ) SWEP.DamageClose = 25 -SWEP.DamageFar = 13 \ No newline at end of file +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 \ No newline at end of file diff --git a/gamemodes/copsnrobbers/gamemode/playerbs.lua b/gamemodes/copsnrobbers/gamemode/playerbs.lua index aafa836..27a36d7 100644 --- a/gamemodes/copsnrobbers/gamemode/playerbs.lua +++ b/gamemodes/copsnrobbers/gamemode/playerbs.lua @@ -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 \ No newline at end of file