Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Health = Material("addons/Marvelous_hud/materials/galactic/ui/health.png")
- local Armor = Material("addons/Marvelous_hud/materials/galactic/ui/backpack.png")
- local Money = Material("addons/Marvelous_hud/materials/galactic/ui/wallet.png")
- local Name = Material("addons/Marvelous_hud/materials/galactic/ui/community.png")
- function draw.OutlinedBox( x, y, w, h, thickness, clr )
- surface.SetDrawColor( clr )
- for i=0, thickness - 1 do
- surface.DrawOutlinedRect( x + i, y + i, w - i * 2, h - i * 2 )
- end
- end
- function HUD()
- local client = LocalPlayer()
- if !client:Alive() then
- return
- end
- --Health--
- draw.RoundedBox(0, 0, ScrH() - 780, 150, 50, Color(155, 0, 18, 230))
- draw.RoundedBox(0, 0, ScrH() - 810, 150, 50, Color(204, 10, 10, 255))
- draw.OutlinedBox( 0, 0, 150, 40, 2, Color( 104, 102, 103, 230 ))
- draw.SimpleText("Health ", "DermaDefaultBold", 35, ScrH() - 753, Color(255, 255, 255, 255), 0, 0)
- draw.SimpleText(""..client:Health(), "DermaDefaultBold", 120, ScrH() - 753, Color(255, 255, 255),0 ,0)
- surface.SetMaterial(Health)
- surface.SetDrawColor(255,255,255,255)
- surface.DrawTexturedRect(5, 13, 20, 20, 2, Color(255, 255, 255, 255))
- -- Armor --
- draw.RoundedBox(0, 150, ScrH() - 780, 150, 50, Color(29, 45, 109, 230))
- draw.RoundedBox(0, 150, ScrH() - 810, 150, 50, Color(16, 74, 165, 255))
- draw.OutlinedBox( 0, 0, 300, 40, 2, Color( 104, 102, 103, 230 ))
- draw.SimpleText("Armour ", "DermaDefaultBold", 185, ScrH() - 753, Color(255, 255, 255, 255), 0, 0)
- draw.SimpleText(""..client:Armor(), "DermaDefaultBold", 280, ScrH() - 753, Color(255, 255, 255),0 ,0)
- surface.SetMaterial(Armor)
- surface.SetDrawColor(255,255,255,255)
- surface.DrawTexturedRect(155, 13, 20, 20, 2, Color(255, 255, 255, 255))
- -- Credits --
- draw.RoundedBox(0, 300, ScrH() - 780, 150, 50, Color(7, 117, 34, 230))
- draw.RoundedBox(0, 300, ScrH() - 810, 150, 50, Color(0, 196, 48, 255))
- draw.OutlinedBox( 0, 0, 450, 40, 2, Color( 104, 102, 103, 230))
- draw.SimpleText("Credits ", "DermaDefaultBold", 345, ScrH() - 753, Color(255, 255, 255, 255), 0, 0)
- draw.SimpleText("" ..client:GetNWInt("playerMoney"), "DermaDefaultBold", 430, ScrH() - 753, Color(255, 255, 255), 0, 0)
- surface.SetMaterial(Money)
- surface.SetDrawColor(255,255,255,255)
- surface.DrawTexturedRect(310, 13, 20, 20, 2, Color(255, 255, 255, 255))
- end
- hook.Add("HUDPaint", "TestHud", HUD)
- local function DrawPlayerInfo(ply)
- local pos = ply:EyePos()
- pos.z = pos.z + 10 -- The position we want is a bit above the position of the eyes
- pos = pos:ToScreen()
- pos.y = pos.y - 50 -- Move the text up a few pixels to compensate for the height of the text
- -- hud code for above head
- --name--
- --Health--
- --Rank--
- end
- function HideHud(name)
- for k, v in pairs({"CHudHealth", "CHudBattery", "CHudAmmo", "CHudSecondaryAmmo"}) do
- if name == v then
- return false
- end
- end
- end
- hook.Add("HUDShouldDraw", "HideDefaultHud", HideHud)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement