Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.43 KB | None | 0 0
  1. local hideHUDElements = {
  2. ["DarkRP_HUD"] = false,
  3. ["DarkRP_EntityDisplay"] = false,
  4. ["DarkRP_ZombieInfo"] = false,
  5. ["DarkRP_LocalPlayerHUD"] = true,
  6. ["DarkRP_Agenda"] = false,
  7. ["DarkRP_Hungermod"] = false,
  8. }
  9.  
  10. hook.Add("HUDShouldDraw", "HideDefaultDarkRPHud", function(name)
  11. if hideHUDElements[name] then return false end
  12. end)
  13.  
  14. surface.CreateFont( "OMLG-Font1", {
  15. font = "Bebas Neue",
  16. size = 22,
  17. weight = 500,
  18. blursize = 0,
  19. scanlines = 0,
  20. antialias = true,
  21. } )
  22.  
  23. surface.CreateFont( "OMLG-Font2", {
  24. font = "Bebas Neue",
  25. size = 25,
  26. weight = 500,
  27. blursize = 0,
  28. scanlines = 0,
  29. antialias = true,
  30. } )
  31.  
  32. hook.Add("HUDPaint", "OMLG-hud", function()
  33. local health = LocalPlayer():Health()
  34. local armor = LocalPlayer():Armor()
  35. local salary = LocalPlayer():getDarkRPVar("salary")
  36. local money = LocalPlayer():getDarkRPVar("money")
  37. local name = LocalPlayer():Nick()
  38. local job = team.GetName(LocalPlayer():Team())
  39. local pos = ScrW()/ 2 - 202
  40. local pos1 = ScrW()/ 2 - 200
  41. local pos2 = ScrW()/ 1 - 650
  42.  
  43. local health
  44. if LocalPlayer():Health() > 100 then
  45. health = 100
  46. else
  47. health = LocalPlayer():Health()
  48. end
  49.  
  50. local armor
  51. if LocalPlayer():Armor() > 100 then
  52. armor = 100
  53. else
  54. armor = LocalPlayer():Armor()
  55. end
  56.  
  57. if GAMEMODE.Config.hungermod then
  58. local food = LocalPlayer():getDarkRPVar("Energy")
  59. draw.SimpleText("Faim: "..food.. "%", "OMLG-Font2", pos2, ScrH() - 140,CONFIG.FOODTEXT)
  60. end
  61.  
  62. if LocalPlayer():Armor() >= 1 then
  63. draw.RoundedBox(25, pos, ScrH() - 53, 504, 20,CONFIG.BASICCOLOR)
  64. draw.RoundedBox(20, pos1, ScrH() - 50, armor * 5, 14,CONFIG.ARMORCOLOR)
  65. draw.SimpleText(LocalPlayer():Armor(), "OMLG-Font1", ScrW()/ 2, ScrH() - 54,CONFIG.TEXTBAR)
  66. end
  67.  
  68. draw.RoundedBox(25, pos, ScrH() - 83, 504, 20,CONFIG.BASICCOLOR)
  69. draw.RoundedBox(20, pos1, ScrH() - 80, health * 5, 14, CONFIG.HEALTHCOLOR)
  70. draw.SimpleText(LocalPlayer():Health(), "OMLG-Font1", ScrW()/ 2, ScrH() - 84,CONFIG.TEXTBAR)
  71. draw.SimpleText("Salaire: "..DarkRP.formatMoney(salary), "OMLG-Font2", pos1, ScrH() - 115,CONFIG.SALARYCOLOR)
  72. draw.SimpleText("Argent: "..DarkRP.formatMoney(money), "OMLG-Font2", pos2, ScrH() - 115,CONFIG.MONEYCOLOR)
  73. draw.SimpleText(name, "OMLG-Font2", pos1, ScrH() - 140,CONFIG.NAMECOLOR)
  74. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement