Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. surface.CreateFont( "Text1", {
  2. font = "Archive", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name
  3. extended = false,
  4. size = 30,
  5. weight = 500,
  6. blursize = 0,
  7. scanlines = 0,
  8. antialias = true,
  9. underline = false,
  10. italic = false,
  11. strikeout = false,
  12. symbol = false,
  13. rotary = false,
  14. shadow = true,
  15. additive = false,
  16. outline = false,
  17. } )
  18. surface.CreateFont( "Text2", {
  19. font = "Arial", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name
  20. extended = false,
  21. size = 20,
  22. weight = 500,
  23. blursize = 0,
  24. scanlines = 0,
  25. antialias = true,
  26. underline = false,
  27. italic = false,
  28. strikeout = false,
  29. symbol = false,
  30. rotary = false,
  31. shadow = true,
  32. additive = false,
  33. outline = false,
  34. } )
  35.  
  36. --local image1 = Material( "materials/mats/test" ) -- add path to the material here?
  37.  
  38.  
  39. hook.Add( "HUDPaint", "gangedhud", function()
  40.  
  41.  
  42. surface.SetDrawColor( 120,250,120 ) -- the color, dont need to touch tho
  43. -- surface.SetMaterial( image1 ) -- dont touch this
  44. surface.DrawTexturedRect( 20, 920, 350, 150 )
  45.  
  46. surface.SetTextPos(105,925)
  47. surface.SetTextColor(120,51,6)
  48. surface.SetFont("Text1")
  49. surface.DrawText("Ganged's Hud")
  50.  
  51. local health = LocalPlayer():Health()
  52. local armor = LocalPlayer():Armor()
  53. local name = LocalPlayer():Name()
  54. local job = LocalPlayer():getDarkRPVar('job')
  55.  
  56.  
  57. draw.RoundedBox(10,45,985,300,30,Color(169,169,169)) --Background Armor
  58. draw.RoundedBox(10,45,1020,300,30,Color(169,169,169)) --Background Health
  59. draw.RoundedBox(10,45,985,health * 3,30,Color(250,150,150)) --Health
  60. draw.RoundedBox(10,45,1020,armor * 3,30,Color(150,150,255)) --Armor
  61. draw.SimpleText(health.."%","Text1",50 + 150, 950 + 50,Color(255,255,255),1,1) --Health
  62. draw.SimpleText(armor.."%","Text1",50 + 150, 986 + 50,Color(255,255,255),1,1) --Armor
  63.  
  64. surface.DrawRect(20,956,350,25,Color(45,45,45))
  65. draw.DrawText( name,"Text2",170,958,Color(255,255,255),TEXT_ALIGN_CENTER )
  66. draw.DrawText( job,"Text2",230,958,Color(255,255,255),TEXT_ALIGN_CENTER )
  67.  
  68.  
  69.  
  70.  
  71. -- the first one, determine where the box is placed right/left
  72. -- the second one, determine where the box is placed up/down
  73. -- the third one, determine the widnt of the box
  74. -- the fouth one, determine the height of the box
  75.  
  76. end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement