Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- surface.CreateFont( "Font_1", {
- font = "Arial", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name
- extended = false,
- size = 16,
- weight = 500,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = true,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = true,
- additive = false,
- outline = false,
- } )
- surface.CreateFont( "Font_2", {
- font = "Arial", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name
- extended = false,
- size = 30,
- weight = 500,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = true,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = true,
- additive = false,
- outline = false,
- } )
- hook.Remove("HUDPaint","HUDSB")
- hook.Add( "HUDShouldDraw", "HideHUD", function( name )
- if ( name == "CHudHealth" or name == "CHudBattery" or name == "CHudAmmo" or name == "CHudSecondaryAmmo" ) then
- return false
- end
- end )
- hook.Add( "HUDPaint", "Hud", function()
- local Hud = {}
- --draw.RoundedBox(math.sin(CurTime()*100)*100+100, 256, 256, 256, 256, Color(255,0,0) )
- Hud["ScrH"] = ScrH()
- Hud["ScrW"] = ScrW()
- Hud["Health"] = LocalPlayer():Health()
- Hud["Armor"] = LocalPlayer():Armor()
- Hud["Ping"] = LocalPlayer():Ping()
- Hud["Waepon"] = LocalPlayer():GetActiveWeapon()
- --Black Box
- draw.RoundedBox( 0, 0, Hud["ScrH"]-50, 300, 50, Color(0,0,0,220) )
- draw.RoundedBox( 0, 0, Hud["ScrH"]-20, 300, 20, Color(0,0,0,100) )
- --Hp / Armor
- draw.RoundedBox( 0, 0, Hud["ScrH"]-50, math.Clamp(Hud["Health"],0,100)*3, 15, Color(255,0,0,255) )
- draw.DrawText( "Hp: "..Hud["Health"],"Font_1", 150, Hud["ScrH"]-50,Color(255,255,255,255),1 )
- draw.RoundedBox( 0, 0, Hud["ScrH"]-35, math.Clamp(Hud["Armor"],0,100)*3, 15, Color(0,0,255,255) )
- draw.DrawText( "Armor: "..Hud["Armor"],"Font_1", 150, Hud["ScrH"]-35,Color(255,255,255,255),1 )
- --Fps / Ping
- draw.DrawText( "Ping: "..Hud["Ping"],"Font_1", 5, Hud["ScrH"]-20,Color(255,255,255,255),0 )
- --Ammo
- if LocalPlayer():Alive() and Hud["Waepon"]:GetClass()!="weapon_crowbar" and Hud["Waepon"]:GetClass()!="gmod_tool" and Hud["Waepon"]:GetClass()!="weapon_physcannon" and Hud["Waepon"]:GetClass()!="weapon_physgun" then
- draw.RoundedBox( 0, Hud["ScrW"]-150, Hud["ScrH"]-50, 150, 50, Color(0,0,0,220) )
- draw.RoundedBox( 0, Hud["ScrW"]-50, Hud["ScrH"]-50, 50, 50, Color(0,0,0,220) )
- draw.DrawText( Hud["Waepon"]:HasAmmo(),"Font_2", Hud["ScrW"]-50, Hud["ScrH"]-50,Color(255,255,255,255),1 )
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement