Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[-------------------------------------------------------------------------
- Config
- ---------------------------------------------------------------------------]]--
- colorhealth = Color(255,0,0) --Couleur de la barre de santé
- colorarmor = Color(0,0,255) --Couleur de la barre d'armure
- colorhunger = Color(255,153,0) --Couleur de la barre de faim
- local hideHUDElements = {
- ["DarkRP_HUD"] = true,
- ["DarkRP_EntityDisplay"] = true,
- ["DarkRP_ZombieInfo"] = true,
- ["DarkRP_LocalPlayerHUD"] = true,
- ["DarkRP_Hungermod"] = true,
- ["DarkRP_Agenda"] = true,
- }
- --[[-------------------------------------------------------------------------
- ---------------------------------------------------------------------------]]--
- local function hideElements(name)
- if name == "CHudHealth" or name == "CHudBattery" or name == "CHudSuitPower" then
- return false
- end
- if hideHUDElements[name] then
- return false
- end
- end
- hook.Add("HUDShouldDraw", "hideElements", hideElements)
- local function Health()
- local health = LocalPlayer():Health()
- if health <= 100 then
- draw.RoundedBox(0,67.5,ScrH()-133.5,health*1.13,15,colorhealth)
- else if health > 100 then
- draw.RoundedBox(0,67.5,ScrH()-133.5,100*1.13,15,colorhealth)
- end
- end
- draw.SimpleText( health.." %", "hs2", 125,ScrH()-136, Color(255,255,255), TEXT_ALIGN_CENTER)
- end
- local function Armor()
- local armor = LocalPlayer():Armor()
- if armor <= 100 then
- draw.RoundedBox(0,67.5,ScrH()-92.5,armor*1.13,15,colorarmor)
- else if armor > 100 then
- draw.RoundedBox(0,67.5,ScrH()-92.5,100*1.13,15,colorarmor)
- end
- end
- draw.SimpleText( armor.." %", "hs2", 125,ScrH()-95, Color(255,255,255), TEXT_ALIGN_CENTER)
- end
- local function Hunger()
- local food = LocalPlayer():getDarkRPVar("Energy")
- draw.RoundedBox(0,67.5,ScrH()-51.5,food*1.13,15,colorhunger)
- draw.SimpleText( food.." %", "hs2", 125,ScrH()-54, Color(255,255,255), TEXT_ALIGN_CENTER)
- end
- --[[-------------------------------------------------------------------------
- Background
- ---------------------------------------------------------------------------]]--
- local function Base()
- surface.SetDrawColor( 255, 255, 255, 255 )
- surface.SetMaterial( Material("hud_syndicate/hud1.png"))
- surface.DrawTexturedRect( 20, ScrH()-202.4, 324, 182.4 )
- surface.SetMaterial( Material("hud_syndicate/logo1.png"))
- surface.DrawTexturedRect( 350 ,ScrH()-50, 50, 50 )
- end
- --[[-------------------------------------------------------------------------
- ---------------------------------------------------------------------------]]--
- local function Job()
- local job = team.GetName(LocalPlayer():Team())
- draw.SimpleText( job, "hs1-2", 240, ScrH()-135, Color(255,255,255), TEXT_ALIGN_LEFT)
- end
- local function Money()
- local money = LocalPlayer():getDarkRPVar("money")
- draw.SimpleText( money.." €", "hs1", 235, ScrH()-93, Color(255,255,255), TEXT_ALIGN_LEFT)
- end
- local function Salary()
- local salary = LocalPlayer():getDarkRPVar("salary")
- draw.SimpleText( salary.." €", "hs1", 245, ScrH()-55, Color(255,255,255), TEXT_ALIGN_LEFT)
- end
- local function Name()
- local name = LocalPlayer():Name()
- draw.SimpleText( name, "hs1-2", 70, ScrH()-197, Color(255,255,255), TEXT_ALIGN_LEFT)
- end
- local function Rank()
- surface.SetDrawColor( 255, 255, 255, 255 )
- if LocalPlayer():GetUserGroup() == "VIP" then
- surface.SetMaterial( Material("hud_syndicate/vip1.png"))
- surface.DrawTexturedRect( 350 ,ScrH()-80, 35, 35 )
- else if LocalPlayer():GetUserGroup() == "superadmin" then
- surface.SetMaterial( Material("hud_syndicate/vip1.png"))
- surface.DrawTexturedRect( 350 ,ScrH()-80, 35, 35 )
- else if LocalPlayer():GetUserGroup() == "Super-Admin" then
- surface.SetMaterial( Material("hud_syndicate/vip1.png"))
- surface.DrawTexturedRect( 350 ,ScrH()-80, 35, 35 )
- else if LocalPlayer():GetUserGroup() == "Administrateur" then
- surface.SetMaterial( Material("hud_syndicate/vip1.png"))
- surface.DrawTexturedRect( 350 ,ScrH()-80, 35, 35 )
- else if LocalPlayer():GetUserGroup() == "Modérateur" then
- surface.SetMaterial( Material("hud_syndicate/vip1.png"))
- surface.DrawTexturedRect( 350 ,ScrH()-80, 35, 35 )
- else if LocalPlayer():GetUserGroup() == "Modo-Test" then
- surface.SetMaterial( Material("hud_syndicate/vip1.png"))
- surface.DrawTexturedRect( 350 ,ScrH()-80, 35, 35 )
- else if LocalPlayer():GetUserGroup() == "VIP+" then
- surface.SetMaterial( Material("hud_syndicate/vip1.png"))
- surface.DrawTexturedRect( 350 ,ScrH()-80, 35, 35 )
- end
- end
- end
- end
- end
- end
- end
- end
- local function GunLicense()
- if LocalPlayer():getDarkRPVar("HasGunlicense") then
- surface.SetDrawColor( 255, 255, 255, 255 )
- surface.SetMaterial( Material("hud_syndicate/licence1.png"))
- surface.DrawTexturedRect( 350 ,ScrH()-115, 40, 40 )
- end
- end
- local function DrawHUDSyn()
- Health()
- Armor()
- Hunger()
- Base()
- Job()
- Money()
- Salary()
- Name()
- Rank()
- GunLicense()
- end
- hook.Add("HUDPaint", "DrawHUDSyn", DrawHUDSyn)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement