function GM:HUDPaint()
self.BaseClass:HUDPaint()
local ply = LocalPlayer()
if ply:Alive() then
local HP = LocalPlayer():Health()
local wep = ply:GetActiveWeapon()
local Ammo1 = LocalPlayer():GetActiveWeapon():Clip1()
local Ammo2 = ply:GetAmmoCount( wep:GetPrimaryAmmoType() )
surface.SetDrawColor(255,255,255,255)
surface.SetMaterial( Material( "materials/pdhud/hp.png", "noclamp" ) )
surface.DrawTexturedRect( 0, ScrH() / ScrH(), 42, 42 ) -- Draws HP Icon
surface.SetTextColor( 255, 0, 0, 255 )
surface.SetTextPos( 50, ScrH() / ScrH()+10 )
surface.SetFont( "pd_basefont" )
surface.DrawText( HP ) -- Puts HP Next to HP Icon
surface.SetDrawColor(255,255,255,255)
surface.SetMaterial( Material( "materials/pdhud/ammo.png", "noclamp" ) )
surface.DrawTexturedRect( 0, ScrH() / ScrH()+42, 42, 42 ) -- Draws Ammo Icon
surface.SetTextColor( 255, 0, 0, 255 )
surface.SetTextPos( 50, ScrH() / ScrH()+52 )
surface.SetFont( "pd_basefont" )
if ply:GetActiveWeapon():Clip1() <0 and ply:GetAmmoCount( wep:GetPrimaryAmmoType() ) == 0 then
surface.DrawText( "Melee" )
elseif ply:GetActiveWeapon():Clip1() <0 and ply:GetAmmoCount( wep:GetPrimaryAmmoType() ) >0 then
surface.DrawText( Ammo2 .. " Rockets")
else
surface.DrawText( Ammo1 .. "/" .. Ammo2 ) -- <MagAmmo>/<OtherAmmo>
end
else
local HP = LocalPlayer():Health()
surface.SetDrawColor(255,255,255,255)
surface.SetMaterial( Material( "materials/pdhud/hp.png", "noclamp" ) )
surface.DrawTexturedRect( 0, ScrH() / ScrH(), 42, 42 ) -- Draws HP Icon
surface.SetTextColor( 255, 0, 0, 255 )
surface.SetTextPos( 50, ScrH() / ScrH()+10 )
surface.SetFont( "pd_basefont" )
surface.DrawText( HP ) -- Puts HP Next to HP Icon
surface.SetDrawColor(255,255,255,255)
surface.SetMaterial( Material( "materials/pdhud/ammo.png", "noclamp" ) )
surface.DrawTexturedRect( 0, ScrH() / ScrH()+42, 42, 42 ) -- Draws Ammo Icon
surface.SetTextColor( 255, 0, 0, 255 )
surface.SetTextPos( 50, ScrH() / ScrH()+52 )
surface.SetFont( "pd_basefont" )
surface.DrawText( "" )
end
end