Advertisement
Guest User

aa

a guest
Feb 25th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.34 KB | None | 0 0
  1. --[[---------------------------------------------------------
  2. Icons
  3. -----------------------------------------------------------]]
  4. local IconHexagon = Material("overwatchhud/hexagon.png", "smooth unlitgeneric")
  5. local IconHexagon2 = Material("overwatchhud/filledhexagon.png", "smooth unlitgeneric")
  6. local IconHealth = Material ("overwatchhud/health.png", "smooth unlitgeneric")
  7. local IconArmor = Material ("overwatchhud/armor.png", "smooth unlitgeneric")
  8. local IconWeapon = Material ("overwatchhud/weapon.png", "smooth unlitgeneric")
  9. local IconAmmo = Material ("overwatchhud/ammo.png", "smooth unlitgeneric")
  10. local IconSalary = Material ("overwatchhud/salary.png", "smooth unlitgeneric")
  11. local IconMoney = Material ("overwatchhud/money.png", "smooth unlitgeneric")
  12. local IconJob = Material ("overwatchhud/job.png", "smooth unlitgeneric")
  13.  
  14.  
  15. --[[---------------------------------------------------------
  16. Noget jeg ikke ved hvad hedder
  17. -----------------------------------------------------------]]
  18. local fisse = {
  19. "weapon_physcannon",
  20. ""
  21. }
  22.  
  23. hook.Add("HUDPaint", "Pik", function(ply)
  24.  
  25. --[[---------------------------------------------------------
  26. Top Middle Bar
  27. -----------------------------------------------------------]]
  28.  
  29. draw.RoundedBox (3, ScrW()*0.5-170, ScrH()*0, 340, 70, Color ( 0, 170, 255, 125) )
  30. draw.RoundedBox (3, ScrW()*0.5-160, ScrH()*0, 320, 60, Color ( 0, 180, 255, 150) )
  31. draw.RoundedBox (3, ScrW()*0.5-150, ScrH()*0, 300, 50, Color ( 0, 190, 255, 255) )
  32. draw.RoundedBox (3, ScrW()*0.5-140, ScrH()*0, 280, 40, Color ( 0, 0, 0, 255) )
  33. draw.DrawText ("Logo/Community Name ", "HudSelectionText", ScrW()*0.5, ScrH()*0.01, Color ( 255, 255, 255, 255), TEXT_ALIGN_CENTER)
  34.  
  35.  
  36. --[[---------------------------------------------------------
  37. Hexagons around the Playermodel
  38. -----------------------------------------------------------]]
  39.  
  40. --> Outside Hexagon
  41. surface.SetDrawColor (0, 130, 178, 125)
  42. surface.SetMaterial (IconHexagon)
  43. surface.DrawTexturedRect(ScrW()*0.0135, ScrH()*0.774, 190, 200)
  44.  
  45. --> Middle Hexagon
  46. surface.SetDrawColor (0, 130, 178, 150)
  47. surface.SetMaterial (IconHexagon)
  48. surface.DrawTexturedRect(ScrW()*0.0215, ScrH()*0.7875, 160, 170)
  49.  
  50. --> First Hexagon
  51. surface.SetDrawColor (0, 155, 255, 255)
  52. surface.SetMaterial (IconHexagon)
  53. surface.DrawTexturedRect(ScrW()*0.027, ScrH()*0.797, 140, 150)
  54.  
  55. -- Black Hexagon
  56. surface.SetDrawColor (119, 87, 0, 255)
  57. surface.SetMaterial (IconHexagon2)
  58. surface.DrawTexturedRect(ScrW()*0.035, ScrH()*0.811, 110, 120)
  59.  
  60. --[[---------------------------------------------------------
  61. Health, Armor, Salary, Money, Job & Weapon/Ammo
  62. -----------------------------------------------------------]]
  63.  
  64. --> Health
  65. local HealthValue = LocalPlayer():Health()*1.464 or 0
  66. draw.RoundedBox(5, ScrW()*0.117, ScrH()-209, 150, 20, Color( 0, 0, 0, 200 ) )
  67. if (HealthValue > 0) then
  68. draw.RoundedBox(5, ScrW()*0.118, ScrH()-207, HealthValue, 16, Color( 255, 0, 0, 150 ) )
  69. end
  70.  
  71. --> Armor
  72. local ArmorValue = LocalPlayer():Armor()*1.464 or 0
  73. draw.RoundedBox(5, ScrW()*0.125, ScrH()-184, 150, 20, Color( 0, 0, 0, 200 ) )
  74. if (ArmorValue > 0) then
  75. draw.RoundedBox(5, ScrW()*0.126, ScrH()-182, ArmorValue, 16, Color( 0, 0, 255, 150 ) )
  76. end
  77.  
  78. --> Salary
  79. draw.RoundedBox(5, ScrW()*0.134, ScrH()-158, 150, 20, Color( 0, 0, 0, 200 ) )
  80. /*draw.DrawText("$"..LocalPlayer():getDarkRPVar("salary"), "HudSelectionText", ScrW()*0.145, ScrH()-157, Color ( 255, 255, 255, 255), TEXT_ALIGN_CENTER)*/
  81.  
  82. --> Money
  83. draw.RoundedBox(5, ScrW()*0.125, ScrH()-132, 150, 20, Color( 0, 0, 0, 200 ) )
  84. draw.DrawText("$"..LocalPlayer():getDarkRPVar("money") or 0, "HudSelectionText", ScrW()*0.128, ScrH()-131, Color ( 255, 255, 255, 255), TEXT_ALIGN_LEFT)
  85.  
  86. --> Job
  87. draw.RoundedBox(5, ScrW()*0.117, ScrH()-103, 150, 20, Color( 0, 0, 0, 200 ) )
  88. draw.DrawText(""..LocalPlayer():getDarkRPVar("job") or "", "HudSelectionText", ScrW()*0.12, ScrH()-102, Color ( 255, 255, 255, 255), TEXT_ALIGN_LEFT)
  89.  
  90. --> Weapon & Ammo
  91. if ( IsValid( LocalPlayer():GetActiveWeapon() ) ) then
  92. draw.RoundedBox(4, ScrW()*0.9, ScrH()-145, 150, 35, Color( 0, 0, 0, 200 ) )
  93. draw.DrawText(""..LocalPlayer():GetActiveWeapon():GetPrintName(), "HudSelectionText", ScrW()*0.937, ScrH()-136, Color( 255, 255, 255, 255), TEXT_ALIGN_CENTER)
  94.  
  95. if not (LocalPlayer():GetActiveWeapon():Clip1() == -1 or LocalPlayer():GetActiveWeapon():GetClass() == "weapon_physcannon") then
  96. draw.RoundedBox(4, ScrW()*0.9, ScrH()-100, 150, 35, Color( 0, 0, 0, 200 ) )
  97. if(LocalPlayer():GetActiveWeapon():Clip1() == -1 or LocalPlayer():GetActiveWeapon():GetClass() == "weapon_physcannon") then
  98. surface.SetDrawColor(255, 255, 255, 255)
  99.  
  100. else
  101.  
  102. draw.DrawText( ""..LocalPlayer():GetActiveWeapon():Clip1().."/"..LocalPlayer():GetAmmoCount(LocalPlayer():GetActiveWeapon():GetPrimaryAmmoType()), "HudSelectionText", ScrW()*0.94, ScrH()-90, Color( 255, 255, 255, 255), TEXT_ALIGN_CENTER)
  103. end
  104. end
  105. end
  106.  
  107.  
  108.  
  109. --[[---------------------------------------------------------
  110. Icons
  111. -----------------------------------------------------------]]
  112. --> Health Icon & Box
  113. surface.SetDrawColor (150, 150, 150, 255)
  114. surface.SetMaterial (IconHealth)
  115. surface.DrawTexturedRect(ScrW()*0.102, ScrH()-211, 24, 24)
  116.  
  117. --> Armor Icon & Box
  118. surface.SetDrawColor (150, 150, 150, 255)
  119. surface.SetMaterial (IconArmor)
  120. surface.DrawTexturedRect(ScrW()*0.110, ScrH()-187, 25, 25)
  121.  
  122. -- Salary Icon & Box
  123. surface.SetDrawColor (0, 0, 0, 255)
  124. surface.SetMaterial (IconSalary)
  125. surface.DrawTexturedRect(ScrW()*0.118, ScrH()-161, 25, 25)
  126.  
  127. -- Money Icon & Box
  128. surface.SetDrawColor (0, 0, 0, 255)
  129. surface.SetMaterial (IconMoney)
  130. surface.DrawTexturedRect(ScrW()*0.110, ScrH()-135, 25, 25)
  131.  
  132. --> Job Icon & Box
  133. surface.SetDrawColor (0, 0, 0, 255)
  134. surface.SetMaterial (IconJob)
  135. surface.DrawTexturedRect(ScrW()*0.102, ScrH()-107, 25, 25)
  136.  
  137. -- Weapon Icon & Box
  138. if ( IsValid( LocalPlayer():GetActiveWeapon() ) ) then
  139. surface.SetDrawColor (255, 255, 255, 255)
  140. surface.SetMaterial (IconWeapon)
  141. surface.DrawTexturedRect(ScrW()*0.885, ScrH()-143, 25, 25)
  142.  
  143. --> Ammo Icon & Box
  144. if not (LocalPlayer():GetActiveWeapon():Clip1() == -1 or LocalPlayer():GetActiveWeapon():GetClass() == "weapon_physcannon") then
  145. surface.SetDrawColor (255, 255, 255, 255)
  146. surface.SetMaterial (IconAmmo)
  147. surface.DrawTexturedRect(ScrW()*0.886, ScrH()-92, 20, 20)
  148. end
  149. end
  150. end)
  151.  
  152. --[[---------------------------------------------------------
  153. Playermodel
  154. -----------------------------------------------------------]]
  155.  
  156. hook.Add("HUDPaint", "PlayerModel", function( )
  157. local _p = LocalPlayer( );
  158.  
  159. if ( !IsValid( _p ) ) then return; end
  160.  
  161. local _model = _p:GetModel( );
  162.  
  163. if ( !PlayerModel || !ispanel( PlayerModel ) ) then
  164. PlayerModel = vgui.Create( "DModelPanel" );
  165. PlayerModel:SetModel( _model );
  166. PlayerModel.__Model = _model;
  167. PlayerModel:SetPos( 88, ScrH()-225 );
  168. PlayerModel:SetAnimated( false );
  169. PlayerModel.bAnimated = false;
  170. PlayerModel:SetSize( 66, 120 )
  171. PlayerModel:SetCamPos( Vector( 16, 0, 65 ) );
  172. PlayerModel:SetLookAt( Vector( 0, 0, 65 ) );
  173. PlayerModel:ParentToHUD( );
  174. end
  175.  
  176. function PlayerModel:LayoutEntity(_model)
  177.  
  178. end
  179.  
  180.  
  181.  
  182. if ( _p:GetModel( ) != PlayerModel.__Model ) then
  183. PlayerModel:SetModel( _model );
  184. PlayerModel.__Model = _model;
  185. end
  186.  
  187. end );
  188.  
  189.  
  190. --[[---------------------------------------------------------
  191. Hiding the default scoreboard
  192. -----------------------------------------------------------]]
  193. local hide = {
  194. CHudHealth = true,
  195. CHudBattery = true,
  196. CHudAmmo = true,
  197. CHudSecondaryAmmo = true,
  198. }
  199.  
  200.  
  201. --[[---------------------------------------------------------
  202. Noget jeg ikke ved hvad hedder2.0
  203. -----------------------------------------------------------]]
  204. hook.Add("HUDShouldDraw", "Lort", function(ply)
  205. if (hide[ ply ]) then return false end
  206. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement