Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- surface.CreateFont( "Text1", {
- font = "Archive", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name
- extended = false,
- size = 30,
- weight = 500,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = true,
- additive = false,
- outline = false,
- } )
- surface.CreateFont( "Text2", {
- font = "Arial", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name
- extended = false,
- size = 20,
- weight = 500,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = true,
- additive = false,
- outline = false,
- } )
- --local image1 = Material( "materials/mats/test" ) -- add path to the material here?
- hook.Add( "HUDPaint", "gangedhud", function()
- surface.SetDrawColor( 120,250,120 ) -- the color, dont need to touch tho
- -- surface.SetMaterial( image1 ) -- dont touch this
- surface.DrawTexturedRect( 20, 920, 350, 150 )
- surface.SetTextPos(105,925)
- surface.SetTextColor(120,51,6)
- surface.SetFont("Text1")
- surface.DrawText("Ganged's Hud")
- local health = LocalPlayer():Health()
- local armor = LocalPlayer():Armor()
- local name = LocalPlayer():Name()
- local job = LocalPlayer():getDarkRPVar('job')
- draw.RoundedBox(10,45,985,300,30,Color(169,169,169)) --Background Armor
- draw.RoundedBox(10,45,1020,300,30,Color(169,169,169)) --Background Health
- draw.RoundedBox(10,45,985,health * 3,30,Color(250,150,150)) --Health
- draw.RoundedBox(10,45,1020,armor * 3,30,Color(150,150,255)) --Armor
- draw.SimpleText(health.."%","Text1",50 + 150, 950 + 50,Color(255,255,255),1,1) --Health
- draw.SimpleText(armor.."%","Text1",50 + 150, 986 + 50,Color(255,255,255),1,1) --Armor
- surface.DrawRect(20,956,350,25,Color(45,45,45))
- draw.DrawText( name,"Text2",170,958,Color(255,255,255),TEXT_ALIGN_CENTER )
- draw.DrawText( job,"Text2",230,958,Color(255,255,255),TEXT_ALIGN_CENTER )
- -- the first one, determine where the box is placed right/left
- -- the second one, determine where the box is placed up/down
- -- the third one, determine the widnt of the box
- -- the fouth one, determine the height of the box
- end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement