Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ply = LocalPlayer()
- local hide = {
- ["CHudHealth"] = true,
- ["CHudBattery"] = true
- }
- hook.Add( "HUDShouldDraw", "HideHUD", function( name )
- if ( hide[ name ] ) then return false end
- end )
- //Font
- surface.CreateFont( "Title", {
- font = "DermaDefault",
- size = 30,
- weight = 600
- } )
- //Painting HUD
- hook.Add( "HUDPaint", "PolygonTest", function()
- //Vars
- //Health painting
- local rindct = {
- { x = 158, y = ScrH()-98 },
- { x = 158, y = ScrH()-129 },
- { x = 432*( ply:Health() / ply:GetMaxHealth() )+158, y = ScrH()-129 },
- { x = 381*( ply:Health() / ply:GetMaxHealth() )+158, y = ScrH()-98 }
- }
- local rindct_shdw = {
- { x = 158, y = ScrH()-98 },
- { x = 158, y = ScrH()-114 },
- { x = 405*( ply:Health() / ply:GetMaxHealth() )+158, y = ScrH()-114 },
- { x = 382*( ply:Health() / ply:GetMaxHealth() )+158, y = ScrH()-98 }
- }
- //Armor Painting
- local aindct = {
- { x = 158, y = ScrH()-64 },
- { x = 158, y = ScrH()-95 },
- { x = 432*( ply:Armor() / 100 )+158, y = ScrH()-95 },
- { x = 381*( ply:Armor() / 100 )+158, y = ScrH()-64 }
- }
- local aindct_shdw = {
- { x = 158, y = ScrH()-64 },
- { x = 158, y = ScrH()-81 },
- { x = 405*( ply:Armor() / 100 )+158, y = ScrH()-81 },
- { x = 382*( ply:Armor() / 100 )+158, y = ScrH()-64 }
- }
- //HP, AP Titles
- local HP_title = {
- { x = 538, y = ScrH()-98 },
- { x = 538, y = ScrH()-129 },
- { x = 595, y = ScrH()-129 },
- { x = 602, y = ScrH()-121 },
- { x = 602, y = ScrH()-107 },
- { x = 595, y = ScrH()-98 }
- }
- local AP_title = {
- { x = 538, y = ScrH()-64 },
- { x = 538, y = ScrH()-95 },
- { x = 595, y = ScrH()-95 },
- { x = 602, y = ScrH()-87 },
- { x = 602, y = ScrH()-73 },
- { x = 595, y = ScrH()-64 }
- }
- //Background
- surface.SetDrawColor( 29, 29, 29, 255 )
- surface.DrawRect( 158, ScrH()-129, 381, 31 )
- surface.SetDrawColor( 29, 29, 29, 255 )
- surface.DrawRect( 158, ScrH()-95, 381, 31 )
- //Health
- surface.SetDrawColor( 254, 0, 0, 255 )
- draw.NoTexture()
- surface.DrawPoly( rindct )
- surface.SetDrawColor( 29, 29, 29, (6375/100) )
- draw.NoTexture()
- surface.DrawPoly( rindct_shdw )
- //Armor
- surface.SetDrawColor( 0, 0, 255, 255 )
- draw.NoTexture()
- surface.DrawPoly( aindct )
- surface.SetDrawColor( 29, 29, 29, (6375/100) )
- draw.NoTexture()
- surface.DrawPoly( aindct_shdw )
- //Avatar Window
- surface.SetDrawColor( 50, 50, 50, 255 )
- surface.DrawRect( 56, ScrH()/1.21+12, 97, 97 )
- //HP,AP Titles
- surface.SetDrawColor( 56, 56, 56, 255 )
- draw.NoTexture()
- surface.DrawPoly( HP_title )
- surface.SetDrawColor( 56, 56, 56, 255 )
- draw.NoTexture()
- surface.DrawPoly( AP_title )
- //HP,AP Titles Text
- surface.SetFont( "Title" )
- surface.SetTextColor( 255, 255, 255 )
- surface.SetTextPos( 553, ScrH()-95 )
- surface.DrawText( "AP" )
- surface.SetFont( "Title" )
- surface.SetTextColor( 255, 255, 255 )
- surface.SetTextPos( 552, ScrH()-129 )
- surface.DrawText( "HP" )
- //Avatar
- end )
- if LangTable then return end
- LangTable = LangTable or {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement