Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function HUD()
- local client = LocalPlayer()
- if !client:Alive() then
- return
- end
- draw.RoundedBox(0, 0, ScrH() - 100, 250, 100, Color(50, 50, 50, 230))
- draw.SimpleText("Health: "..client:Health(), "DermaDefaultBold", 10, Scrh() - 90, Color(255, 255, 255, 255), 0, 0)
- draw.RoundedBox(0, 10, ScrH() - 75, 100 * 2.25, 15, Color(255, 0, 0, 255))
- draw.RoundedBox(0, 10, ScrH() - 75, math.Clamp(client:Health(), 0, 100) * 2.25,15, Color(255, 0, 0, 255))
- draw.RoundedBox(0, 10, ScrH() - 75, math.Clamp(client:Health(), 0, 100) * 2.25,15, Color(255, 30, 30, 255))
- draw.SimpleText("Armor: "..client:Armor(), "DermaDefaultBold", 10, Scrh() - 90, Color(255, 255, 255, 255), 0, 0)
- draw.RoundedBox(0, 10, ScrH() - 30, 100 * 2.25, 15, Color(0, 0, 255, 30))
- draw.RoundedBox(0, 10, ScrH() - 30, math.Clamp(client:Armor(), 0, 100)) * 2.25, 15, Color(0, 0, 255, 255))
- draw.RoundedBox(0, 10, ScrH() - 30, math.Clamp(client:Armor(), 0, 100)) * 2.25, 5, Color(15, 15, 255, 255))
- draw.RoundedBox(0, 255, ScrH() - 70, 125, 70, Color(30, 30, 30, 230))
- if (client:GetActiveWeapon():GetPrintName() !=nil) then
- draw.SimpleText(client:GetActiveWeapon():GetPrintName(), "DermaDefaultBold", 260, ScrH() - 60, Color(255, 255, 255, 255), 0, 0)
- end
- if (client:GetActiveWeapon() :Clip1() != -1) then
- draw.SimpleText("Ammo: ".. client:GetActiveWeapon():Clip1() .. "/" .. client:GetActiveWeapon():GetPrimaryAmmoType())
- end
- end
- hook.Add("HUDPaint", "TestHud", HUD)
- function HideHud(name)
- for k, v in pairs(("CHudHealth", "CHudBattery", "CHudAmmo", "CHudSecondaryAmmo"))
- if name == v then
- return false
- end
- end
- end
- hook.Add("HUDShouldDraw", "HideDefaultHud", HideHud)
Advertisement
Add Comment
Please, Sign In to add comment