From 14621b185968f8df8ad48255c75c24849d1ce075 Mon Sep 17 00:00:00 2001 From: Fesiug Date: Mon, 1 Jan 2024 17:57:55 -0500 Subject: [PATCH] Use bMagClass --- gamemodes/benny/gamemode/modules/player/cl_hud.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gamemodes/benny/gamemode/modules/player/cl_hud.lua b/gamemodes/benny/gamemode/modules/player/cl_hud.lua index d9e844c..ba11490 100644 --- a/gamemodes/benny/gamemode/modules/player/cl_hud.lua +++ b/gamemodes/benny/gamemode/modules/player/cl_hud.lua @@ -526,12 +526,12 @@ hook.Add( "HUDPaint", "Benny_HUDPaint", function() draw.SimpleText( wep:B_FiremodeName( hand ), "Benny_12", p_x + pb + ss(14.5), p_y + pb + t_h + ss(8), scheme["bg"], TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER ) -- draw.SimpleText( "[AMMO TYPE]", "Benny_10", p_x + pb + ss(30+4), p_y + pb + t_h + ss(8), scheme["fg"], TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER ) end - if wep_table.Loaded and wep_table.Loaded != "" then -- Ammo + if wep:bMagClass( hand ) then -- Ammo local b_w, b_h = ss(3), ss(10) local lw, lh = ss(2), ss(2) surface.SetDrawColor( scheme["fg"] ) - local ammo = math.max( wep:bGetIntClip( hand ), ItemDef(inv[wep_table.Loaded].Class).Ammo ) + local ammo = math.max( wep:bGetIntClip( hand ), wep:bMagClass( hand ).Ammo ) if ammo>30 then b_w, b_h = ss(3), ss(4) end local offset = b_h