Advertisement
Guest User

hud

a guest
Jul 23rd, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. -- Désactiver les autres HUD et parties client
  2.  
  3. local hide = {
  4. CHudHealth = true,
  5. CHudBattery = true,
  6. DarkRP_HUD = true,
  7. DarkRP_Hungermod = true,
  8. CHudAmmo = true,
  9. CHudSecondaryAmmo = true
  10. }
  11.  
  12. hook.Add("HUDShouldDraw", "FriteHUDhook", function(name)
  13. if (hide[name]) then return false end
  14. end)
  15.  
  16. hook.Add( "HUDPaint", "FriteHUD_DarkRP", function()
  17.  
  18. local ply = LocalPlayer()
  19.  
  20. -- Vie
  21.  
  22. draw.RoundedBox(4, 5 + 73, ScrH() - 106, 303, 17, Color(0, 0, 0, 255))
  23. draw.RoundedBox(4, 5 + 75, ScrH() - 105, math.Clamp(ply:Health() * 3, 0, 300), 15, Color(255, 0, 0,200))
  24.  
  25. -- Faim
  26.  
  27. draw.RoundedBox(4, 5 + 73, ScrH() - 76, 303, 17, Color(0, 0, 0, 255))
  28. draw.RoundedBox(4, 5 + 75, ScrH() - 75, math.Clamp(ply:getDarkRPVar("Energy") * 3, 0, 300), 15, Color(0, 255, 0))
  29.  
  30. draw.SimpleTextOutlined( "Vous êtes affamé !", "DermaLarge", 5 + 75, ScrH() - 75, Color( 255, 255, 255, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_TOP, 1, Color( 25, 25, 25, 255 ) )
  31.  
  32. -- Armure
  33.  
  34. if ply:Armor() > 0 then
  35.  
  36. draw.RoundedBox(4, 5 + 73, ScrH() - 46, 303, 17, Color(0, 0, 0, 255))
  37. draw.RoundedBox(4, 5 + 75, ScrH() - 45, math.Clamp(ply:Armor() * 3, 0, 300), 15, Color(68, 140, 255, 255))
  38.  
  39. else
  40.  
  41. end
  42. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement