• How to issue a HUD only combine faction (Clockwork)
    8 replies, posted
Hello, sorry for my bad english. But i have one question. How to issue a HUD for only Combine faction (So that ordinary citizens are not issued this HUD) function HUDPaint(Combine) local ply = LocalPlayer() local health_mul = math.Clamp( ply:Health() / ply:GetMaxHealth(), 0, 1 ) local armor_mul = math.Clamp( ply:Armor() / ply:GetMaxArmor(), 0, 1 ) -- Font --Фонт surface.CreateFont( "Harmonia", { font = "harmoniasansprocyr-light", -- выбор фонта size = 40, weight = 500, blursize = 1, scanlines = 2, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = false, outline = false, } ) surface.CreateFont( "Harmoniabig", { font = "harmoniasansprocyr-light", -- выбор фонта size = 100, weight = 500, blursize = 2, scanlines = 2, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = false, outline = false, } ) -- Просто квадрат draw.RoundedBox(1, 500, 50, 500, 20,  Color(100,100,100,100) ) -- Health -- Хп draw.RoundedBox( 1, 500, ScrH() - 850,  ply:Health() *5, 20, Color(0,140,194,150) )  draw.SimpleText("СИСТЕМА ЖИЗНИОБЕСПЕЧЕНИЯ", "Harmonia", 490, 70, Color (0,150,255,200) ) draw.SimpleText(""..ply:Health(), "Harmoniabig", 1000, 10, Color (0,150,255,200) ) -- Just box --Просто квадрат draw.RoundedBox(1, 200, 180, 15, 500, Color(0,0,0,100) ) -- Armor -- Броня draw.RoundedBox( 1, 200, ScrH() - 720, 15, ply:Armor() *5, Color(150,150,150,150) )  -- Text -- Текст draw.SimpleText("БИОСИГНАЛ ПРИНАДЛЕЖИТ: "..ply:GetName(), "Harmonia", 350, 799, Color (0,150,0,255) ) -- ENERGY -- Энергия draw.SimpleText("E", "Harmoniabig", 100, 200,Color (150,150,150,255) ) draw.SimpleText("N", "Harmoniabig", 95, 270,Color (150,150,150,255) ) draw.SimpleText("E", "Harmoniabig", 100, 340,Color (150,150,150,255) ) draw.SimpleText("R", "Harmoniabig", 100, 420,Color (150,150,150,255) ) draw.SimpleText("G", "Harmoniabig", 90, 495,Color (150,150,150,255) ) draw.SimpleText("Y", "Harmoniabig", 100, 570,Color (150,150,150,255) ) -- Сердцебиение end; hook.Add("HUDPaint", "PaintsHUD", HUDPaint)
What gamemode are you running?
I assume DarkRP? If so, then you can use this: if( ply:Team() == TEAM_TEAMHERE ) --Hud Stuff-- If you wanted to use the Mayor as this example, here's a simple thing I did in a DarkRP server and it worked fine. function HUDPaint(Combine) local ply = LocalPlayer() if( ply:Team() == TEAM_MAYOR ) then <--- -- Font --Фонт surface.CreateFont( "Harmonia", { font = "harmoniasansprocyr-light", -- выбор фонта size = 40, weight = 500, blursize = 1, scanlines = 2, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = false, outline = false, } ) surface.CreateFont( "Harmoniabig", { font = "harmoniasansprocyr-light", -- выбор фонта size = 100, weight = 500, blursize = 2, scanlines = 2, antialias = true, underline = false, italic = false, strikeout = false, symbol = false, rotary = false, shadow = false, additive = false, outline = false, } ) -- Просто квадрат draw.RoundedBox(1, 500, 50, 500, 20,  Color(100,100,100,100) ) -- Health -- Хп draw.RoundedBox( 1, 500, ScrH() - 850,  ply:Health() *5, 20, Color(0,140,194,150) )  draw.SimpleText("СИСТЕМА ЖИЗНИОБЕСПЕЧЕНИЯ", "Harmonia", 490, 70, Color (0,150,255,200) ) draw.SimpleText(""..ply:Health(), "Harmoniabig", 1000, 10, Color (0,150,255,200) ) -- Just box --Просто квадрат draw.RoundedBox(1, 200, 180, 15, 500, Color(0,0,0,100) ) -- Armor -- Броня draw.RoundedBox( 1, 200, ScrH() - 720, 15, ply:Armor() *5, Color(150,150,150,150) )  -- Text -- Текст draw.SimpleText("БИОСИГНАЛ ПРИНАДЛЕЖИТ: "..ply:GetName(), "Harmonia", 350, 799, Color (0,150,0,255) ) -- ENERGY -- Энергия draw.SimpleText("E", "Harmoniabig", 100, 200,Color (150,150,150,255) ) draw.SimpleText("N", "Harmoniabig", 95, 270,Color (150,150,150,255) ) draw.SimpleText("E", "Harmoniabig", 100, 340,Color (150,150,150,255) ) draw.SimpleText("R", "Harmoniabig", 100, 420,Color (150,150,150,255) ) draw.SimpleText("G", "Harmoniabig", 90, 495,Color (150,150,150,255) ) draw.SimpleText("Y", "Harmoniabig", 100, 570,Color (150,150,150,255) ) -- Сердцебиение  end end; hook.Add("HUDPaint", "PaintsHUD", HUDPaint)
It's clockwork. And he's doesn't supprot darkrp functions...
Clockwork hl2rp Correct?
Thought you were using DarkRP, my bad. Anyways I will see if I can find something to help out but I'm not 100% sure
Ok
I'll keep looking, though. If I find anything of interest I'll make sure to post it on this thread when I can.
Ok, Thanks
Sorry, you need to Log In to post a reply to this thread.