Advertisement
Guest User

GarboHUD

a guest
Aug 18th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.03 KB | None | 0 0
  1. local hide = {
  2.     CHudHealth = true,
  3.     CHudBattery = true,
  4. }
  5.  
  6. hook.Add("HUDShouldShow","GarboHUDInit",function(name)
  7.  
  8.     if ( hide[ name ] ) then return false end
  9.  
  10. end)
  11.  
  12. hook.Add( "HUDPaint", "HUDPaint_DrawABox", function()
  13.  
  14.     local GarboBoxSize = 128*1.25
  15.     draw.RoundedBox( 0, (ScrW()/40), ScrH()-ScreenScale(GarboBoxSize/1.75), ScreenScale(GarboBoxSize), GarboBoxSize, Color( 0, 0, 0, 128 ) )
  16.  
  17.     surface.CreateFont("TrashFont", {
  18.     font = "Helvetica", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name
  19.     extended = false,
  20.     size = 24,
  21.     weight = 500,
  22.     blursize = 0,
  23.     scanlines = 0,
  24.     antialias = true,
  25.     underline = false,
  26.     italic = true,
  27.     strikeout = false,
  28.     symbol = false,
  29.     rotary = false,
  30.     shadow = true,
  31.     additive = false,
  32.     outline = false,
  33.         } )
  34.  
  35. --Shadow
  36.     surface.SetFont("TrashFont")
  37.     surface.SetTextColor( 0, 142/2, 0, 255)
  38.     surface.SetTextPos( (ScrW()/40)*2-2, ScrH()-ScreenScale(GarboBoxSize/1.75)+24+2 )
  39.     surface.DrawText("Health: ")
  40.  
  41. --Main Text
  42.     surface.SetFont("TrashFont")
  43.     surface.SetTextColor( 0, 142, 0, 255)
  44.     surface.SetTextPos( (ScrW()/40)*2, ScrH()-ScreenScale(GarboBoxSize/1.75)+24 )
  45.     surface.DrawText("Health: ")
  46.  
  47. --Shadow
  48.     surface.SetFont("TrashFont")
  49.     surface.SetTextColor( 0, 0, 142/2, 255)
  50.     surface.SetTextPos( (ScrW()/40)*2-2, ScrH()-ScreenScale(GarboBoxSize/1.75)+24*3+2 )
  51.     surface.DrawText("Armor: ")
  52.  
  53. --Main Text
  54.     surface.SetFont("TrashFont")
  55.     surface.SetTextColor( 0, 0, 142, 255)
  56.     surface.SetTextPos( (ScrW()/40)*2, ScrH()-ScreenScale(GarboBoxSize/1.75)+24*3 )
  57.     surface.DrawText("Armor: ")    
  58.  
  59. local TexturedQuadStructure = {
  60.     texture = surface.GetTextureID( 'models/props_combine/tprings_globe' ),
  61.     color    = Color( 255, 0, 255, 255 ),
  62.     x     = (ScrW()/40)/2+50,
  63.     y     = ScrH()-ScreenScale(GarboBoxSize/1.75)+24*3,
  64.     w     = 128,
  65.     h     = 128/10
  66. }
  67.  
  68. draw.TexturedQuad( TexturedQuadStructure )
  69.  
  70. end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement