Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. local ply = LocalPlayer()
  2.  
  3. local hide = {
  4. ["CHudHealth"] = true,
  5. ["CHudBattery"] = true
  6. }
  7.  
  8. hook.Add( "HUDShouldDraw", "HideHUD", function( name )
  9. if ( hide[ name ] ) then return false end
  10.  
  11. end )
  12. //Font
  13.  
  14. surface.CreateFont( "Title", {
  15. font = "DermaDefault",
  16. size = 30,
  17. weight = 600
  18. } )
  19.  
  20. //Painting HUD
  21.  
  22. hook.Add( "HUDPaint", "PolygonTest", function()
  23.  
  24. //Vars
  25.  
  26. //Health painting
  27. local rindct = {
  28. { x = 158, y = ScrH()-98 },
  29. { x = 158, y = ScrH()-129 },
  30. { x = 432*( ply:Health() / ply:GetMaxHealth() )+158, y = ScrH()-129 },
  31. { x = 381*( ply:Health() / ply:GetMaxHealth() )+158, y = ScrH()-98 }
  32. }
  33. local rindct_shdw = {
  34. { x = 158, y = ScrH()-98 },
  35. { x = 158, y = ScrH()-114 },
  36. { x = 405*( ply:Health() / ply:GetMaxHealth() )+158, y = ScrH()-114 },
  37. { x = 382*( ply:Health() / ply:GetMaxHealth() )+158, y = ScrH()-98 }
  38. }
  39.  
  40. //Armor Painting
  41.  
  42. local aindct = {
  43. { x = 158, y = ScrH()-64 },
  44. { x = 158, y = ScrH()-95 },
  45. { x = 432*( ply:Armor() / 100 )+158, y = ScrH()-95 },
  46. { x = 381*( ply:Armor() / 100 )+158, y = ScrH()-64 }
  47. }
  48. local aindct_shdw = {
  49. { x = 158, y = ScrH()-64 },
  50. { x = 158, y = ScrH()-81 },
  51. { x = 405*( ply:Armor() / 100 )+158, y = ScrH()-81 },
  52. { x = 382*( ply:Armor() / 100 )+158, y = ScrH()-64 }
  53. }
  54.  
  55. //HP, AP Titles
  56.  
  57. local HP_title = {
  58. { x = 538, y = ScrH()-98 },
  59. { x = 538, y = ScrH()-129 },
  60. { x = 595, y = ScrH()-129 },
  61. { x = 602, y = ScrH()-121 },
  62. { x = 602, y = ScrH()-107 },
  63. { x = 595, y = ScrH()-98 }
  64.  
  65. }
  66.  
  67. local AP_title = {
  68. { x = 538, y = ScrH()-64 },
  69. { x = 538, y = ScrH()-95 },
  70. { x = 595, y = ScrH()-95 },
  71. { x = 602, y = ScrH()-87 },
  72. { x = 602, y = ScrH()-73 },
  73. { x = 595, y = ScrH()-64 }
  74. }
  75.  
  76. //Background
  77. surface.SetDrawColor( 29, 29, 29, 255 )
  78. surface.DrawRect( 158, ScrH()-129, 381, 31 )
  79. surface.SetDrawColor( 29, 29, 29, 255 )
  80. surface.DrawRect( 158, ScrH()-95, 381, 31 )
  81. //Health
  82. surface.SetDrawColor( 254, 0, 0, 255 )
  83. draw.NoTexture()
  84. surface.DrawPoly( rindct )
  85. surface.SetDrawColor( 29, 29, 29, (6375/100) )
  86. draw.NoTexture()
  87. surface.DrawPoly( rindct_shdw )
  88. //Armor
  89. surface.SetDrawColor( 0, 0, 255, 255 )
  90. draw.NoTexture()
  91. surface.DrawPoly( aindct )
  92. surface.SetDrawColor( 29, 29, 29, (6375/100) )
  93. draw.NoTexture()
  94. surface.DrawPoly( aindct_shdw )
  95. //Avatar Window
  96. surface.SetDrawColor( 50, 50, 50, 255 )
  97. surface.DrawRect( 56, ScrH()/1.21+12, 97, 97 )
  98. //HP,AP Titles
  99. surface.SetDrawColor( 56, 56, 56, 255 )
  100. draw.NoTexture()
  101. surface.DrawPoly( HP_title )
  102. surface.SetDrawColor( 56, 56, 56, 255 )
  103. draw.NoTexture()
  104. surface.DrawPoly( AP_title )
  105. //HP,AP Titles Text
  106. surface.SetFont( "Title" )
  107. surface.SetTextColor( 255, 255, 255 )
  108. surface.SetTextPos( 553, ScrH()-95 )
  109. surface.DrawText( "AP" )
  110. surface.SetFont( "Title" )
  111. surface.SetTextColor( 255, 255, 255 )
  112. surface.SetTextPos( 552, ScrH()-129 )
  113. surface.DrawText( "HP" )
  114. //Avatar
  115.  
  116. end )
  117.  
  118. if LangTable then return end
  119. LangTable = LangTable or {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement