Guest User

Untitled

a guest
Jan 7th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. function HUD()
  2. local client = LocalPlayer()
  3.  
  4. if !client:Alive() then
  5. return
  6. end
  7.  
  8. draw.RoundedBox(0, 0, ScrH() - 100, 250, 100, Color(50, 50, 50, 230))
  9.  
  10. draw.SimpleText("Health: "..client:Health(), "DermaDefaultBold", 10, Scrh() - 90, Color(255, 255, 255, 255), 0, 0)
  11. draw.RoundedBox(0, 10, ScrH() - 75, 100 * 2.25, 15, Color(255, 0, 0, 255))
  12. draw.RoundedBox(0, 10, ScrH() - 75, math.Clamp(client:Health(), 0, 100) * 2.25,15, Color(255, 0, 0, 255))
  13. draw.RoundedBox(0, 10, ScrH() - 75, math.Clamp(client:Health(), 0, 100) * 2.25,15, Color(255, 30, 30, 255))
  14.  
  15. draw.SimpleText("Armor: "..client:Armor(), "DermaDefaultBold", 10, Scrh() - 90, Color(255, 255, 255, 255), 0, 0)
  16. draw.RoundedBox(0, 10, ScrH() - 30, 100 * 2.25, 15, Color(0, 0, 255, 30))
  17. draw.RoundedBox(0, 10, ScrH() - 30, math.Clamp(client:Armor(), 0, 100)) * 2.25, 15, Color(0, 0, 255, 255))
  18. draw.RoundedBox(0, 10, ScrH() - 30, math.Clamp(client:Armor(), 0, 100)) * 2.25, 5, Color(15, 15, 255, 255))
  19.  
  20. draw.RoundedBox(0, 255, ScrH() - 70, 125, 70, Color(30, 30, 30, 230))
  21.  
  22. if (client:GetActiveWeapon():GetPrintName() !=nil) then
  23. draw.SimpleText(client:GetActiveWeapon():GetPrintName(), "DermaDefaultBold", 260, ScrH() - 60, Color(255, 255, 255, 255), 0, 0)
  24. end
  25.  
  26. if (client:GetActiveWeapon() :Clip1() != -1) then
  27. draw.SimpleText("Ammo: ".. client:GetActiveWeapon():Clip1() .. "/" .. client:GetActiveWeapon():GetPrimaryAmmoType())
  28. end
  29. end
  30. hook.Add("HUDPaint", "TestHud", HUD)
  31.  
  32. function HideHud(name)
  33. for k, v in pairs(("CHudHealth", "CHudBattery", "CHudAmmo", "CHudSecondaryAmmo"))
  34. if name == v then
  35. return false
  36. end
  37. end
  38. end
  39. hook.Add("HUDShouldDraw", "HideDefaultHud", HideHud)
Advertisement
Add Comment
Please, Sign In to add comment