Use bMagClass

This commit is contained in:
Fesiug 2024-01-01 17:57:55 -05:00
parent 8c7ba7f5e9
commit 14621b1859
1 changed files with 2 additions and 2 deletions

View File

@ -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