Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if SERVER then
- resource.AddFile( "resource/fonts/purista numbers.ttf" )
- resource.AddFile( "resource/fonts/purista semibold.ttf" )
- resource.AddFile( "materials/icons/heart.png" )
- resource.AddFile( "materials/icons/identification.png" )
- resource.AddFile( "materials/icons/employment.png" )
- resource.AddFile( "materials/icons/wanted.png" )
- return
- end
- surface.CreateFont( "hudmain", {
- font = "BF4 Numbers",
- size = 20,
- weight = 200,
- } )
- surface.CreateFont( "hudmainsmall", {
- font = "BF4 Numbers",
- size = 16,
- weight = 200,
- } )
- local heart = Material("icons/heart.png")
- local shield = Material("icons/shield.png")
- local wanted = Material("icons/wanted.png")
- local id = Material("icons/identification.png")
- local employment = Material("icons/employment.png")
- local gradient = Material( "gui/gradient" )
- local hideHUDElements = {
- ["DarkRP_HUD"] = false,
- ["DarkRP_EntityDisplay"] = false,
- ["DarkRP_ZombieInfo"] = false,
- ["DarkRP_LocalPlayerHUD"] = true,
- ["DarkRP_Hungermod"] = true,
- ["DarkRP_Agenda"] = true
- }
- hook.Add("HUDShouldDraw", "HideDefaultDarkRPHud", function(name)
- if hideHUDElements[name] then return false end
- if name == "CHudHealth" or name == "CHudBattery" or name == "CHudSuitPower" or name == "CHudAmmo" or name == "CHudSecondaryAmmo" then return false end
- end)
- function dyinglighthud()
- local Health = LocalPlayer():Health() or 0
- if Health > 0 then Health = DrawHealth end
- if Health < 0 then Health = 0 end
- if Health >100 then Health = 100 end
- local Armor = LocalPlayer():Armor() or 0
- if Armor > 0 then Armor = DrawArmor end
- if Armor < 0 then Armor = 0 end
- if Armor >100 then Armor = 100 end
- local Health = LocalPlayer():Health( )
- if Health < 36 then
- local speed = 2
- if Health < 21 then speed = 5 end
- HB = Color(math.Clamp(255 * math.sin(CurTime() * speed),100,255),0,0,255)
- else
- HB = Color(115,115,115,155)
- end
- draw.RoundedBox(0,44, 45,276,30,Color(15,15,15,246))
- end
- hook.Add("HUDPaint", "DLH", dyinglighthud)
- function DLH(name)
- for k, v in pairs ({"CHudHealth", "CHudBattery", "CHudAmmo", "CHudSecondaryAmmo"}) do
- if name == v then
- return false
- end
- end
- end
- hook.Add("HUDShouldDraw","HideDefaultHud", DLH)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement