Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local hideHUDElements = {
- -- if you DarkRP_HUD this to true, ALL of DarkRP's HUD will be disabled. That is the health bar and stuff,
- -- but also the agenda, the voice chat icons, lockdown text, player arrested text and the names above players' heads
- ["DarkRP_HUD"] = false,
- -- This is the one you're most likely to replace first
- -- DarkRP_LocalPlayerHUD is the default HUD you see on the bottom left of the screen
- -- It shows your health, job, salary and wallet, but NOT hunger (if you have hungermod enabled)
- ["DarkRP_LocalPlayerHUD"] = true,
- -- If you have hungermod enabled, you will see a hunger bar in the DarkRP_LocalPlayerHUD
- -- This does not get disabled with DarkRP_LocalPlayerHUD so you will need to disable DarkRP_Hungermod too
- ["DarkRP_Hungermod"] = true,
- -- Drawing the DarkRP agenda
- ["DarkRP_Agenda"] = true,
- -- Lockdown info on the HUD
- ["DarkRP_LockdownHUD"] = true,
- -- Arrested HUD
- ["DarkRP_ArrestedHUD"] = true,
- [ 'CHudAmmo' ] = true,
- [ 'CHudBattery' ] = true,
- [ 'CHudHealth' ] = true,
- }
- -- this is the code that actually disables the drawing.
- hook.Add("HUDShouldDraw", "HideDefaultDarkRPHud", function(name)
- if hideHUDElements[name] then return false end
- end)
- LocalPlayer().DarkRPVars = LocalPlayer().DarkRPVars or {}
- --If the money is not set, don't do anything
- local v1 = LocalPlayer().DarkRPVars.money
- if not v1 then v1 = "" end
- --If the salary is not set, don't do anything
- local v2 = LocalPlayer().DarkRPVars.salary
- if not v2 then v2 = "" end
- local GunLicense = LocalPlayer():getDarkRPVar("HasGunlicense")
- if GunLicense then GunLicense = "Yes" else GunLicense = "No" end
- local self = LocalPlayer()
- if not self:Alive() or not IsValid( self:GetActiveWeapon() ) then return end
- local ammo, reserve = self:GetActiveWeapon():Clip1() < 0 and -2 or self:GetActiveWeapon():Clip1(), self:GetAmmoCount( self:GetActiveWeapon():GetPrimaryAmmoType() )
- local name = self:GetActiveWeapon():GetPrintName()
- local disabled = ammo <= 0 and reserve <= 0 and true or false
- surface.CreateFont( "CustomFont", {
- font = "Myriad", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name
- extended = false,
- size = 17,
- weight = 1000,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = false,
- additive = false,
- outline = false,
- } )
- surface.CreateFont( "CustomFont2", {
- font = "Myriad", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name
- extended = false,
- size = 12,
- weight = 1000,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- underline = false,
- italic = false,
- strikeout = false,
- symbol = false,
- rotary = false,
- shadow = false,
- additive = false,
- outline = false,
- } )
- PropLimitation = {}
- PropLimitation["superadmin"] = { Limitation = 200 }
- PropLimitation["moderator"] = { Limitation = 50 }
- PropLimitation["user"] = { Limitation = 25 }
- --draw.DrawText( PropCount.. " / "..PropLimit, "font", xposition, yposition, Color( 255,255,255 ), TEXT_ALIGN_CENTER )
- hook.Add( "HUDPaint", "HUDIdent", function()
- local PropRankDetection = PropLimitation[LocalPlayer():GetNWString("usergroup", "")]
- local PropLimit = PropRankDetection and PropRankDetection.Limitation or "NIL"
- local PropCount = LocalPlayer():GetCount("props")
- draw.RoundedBox( 0, 0, ScrH()-40, ScrW(), 50, Color( 25, 25, 25, 225)) -- curvachure, x, y, width, height, rgb/alpha
- surface.SetDrawColor( 120, 120, 120, 255 )
- draw.RoundedBox( 0, 0, ScrH()-35, ScrW(), 30, Color( 120, 120, 120, 255 ))
- surface.SetDrawColor( 192, 43, 43, 120 )
- draw.RoundedBox( 0, 0, ScrH()-35, ScrW(), 30, Color( 192, 43, 43, 120 ))
- surface.SetDrawColor( 0, 0, 255, 100 )
- draw.RoundedBox( 0, 0, ScrH()-35, ScrW(), 30, Color( 0, 0, 255, 100 ))
- surface.SetDrawColor( 0, 255, 0, 100 )
- draw.RoundedBox( 0, 0, ScrH()-35, ScrW(), 30, Color( 0, 255, 0, 100 ))
- surface.SetDrawColor( 0, 230, 0, 100 )
- draw.RoundedBox( 0, 0, ScrH()-35, ScrW(), 30, Color( 0, 230, 0, 100 ))
- surface.SetDrawColor( 255, 255, 0, 100 )
- draw.RoundedBox( 0, 0, ScrH()-35, ScrW(), 30, Color( 255, 255, 0, 100 ))
- surface.SetDrawColor( 25, 25, 25, 200 )
- draw.RoundedBox( 0, 0, ScrH()-35, ScrW(), 30, Color( 25, 25, 25, 200 ))
- -- Name
- surface.SetTexture(surface.GetTextureID("gui/silkicons/user"))
- -- surface.DrawTexturedRect(25 + 10,ScrH() - 160,16,16)
- draw.SimpleText("Name: "..LocalPlayer():Nick(),"CustomFont", 25 + 30,ScrH() - 30, Color(255,255,255))
- -- Money
- surface.SetTexture(surface.GetTextureID("gui/silkicons/money"))
- -- surface.DrawTexturedRect(25 + 10,ScrH() - 140,16,16)
- draw.SimpleText("Money: $" .. v1,"CustomFont", ScrW() - ScrW() + 765,ScrH() - 30, Color(255,255,255))
- -- Salary
- surface.SetTexture(surface.GetTextureID("gui/silkicons/money_add"))
- -- surface.DrawTexturedRect(25 + 10,ScrH() - 120,16,16)
- draw.SimpleText("Salary: $" .. v2,"CustomFont", ScrW() - ScrW() + 950,ScrH() - 30, Color(255,255,255))
- -- Job
- surface.SetTexture(surface.GetTextureID("gui/silkicons/group"))
- -- surface.DrawTexturedRect(25 + 10,ScrH() - 100,16,16)
- draw.SimpleText("Job: "..LocalPlayer().DarkRPVars.job,"CustomFont", ScrW() - ScrW() + 1125,ScrH() - 30, Color(255,255,255))
- -- Health
- surface.SetTexture(surface.GetTextureID("gui/silkicons/heart"))
- -- surface.DrawTexturedRect(25 + 10,ScrH() - 80,16,16)
- draw.SimpleText("Health: "..LocalPlayer():Health() ,"CustomFont", ScrW() - ScrW() + 430,ScrH() - 30, Color(255,255,255))
- -- Armour
- surface.SetTexture(surface.GetTextureID("gui/silkicons/shield"))
- -- surface.DrawTexturedRect(25 + 10,ScrH() - 60,16,16)
- draw.SimpleText("Armour: "..LocalPlayer():Armor() ,"CustomFont", ScrW() - ScrW() + 600,ScrH() - 30, Color(255,255,255))
- -- Has License
- surface.SetTexture(surface.GetTextureID("gui/silkicons/shield"))
- -- surface.DrawTexturedRect(25 + 10,ScrH() - 60,16,16)
- draw.SimpleText("Has Gun License: "..GunLicense ,"CustomFont", ScrW() - ScrW() + 1350,ScrH() - 30, Color(255,255,255))
- -- FPS
- surface.SetTexture(surface.GetTextureID("gui/silkicons/shield"))
- draw.SimpleText("FPS: "..math.floor(1 / RealFrameTime()) ,"CustomFont2", ScrW()-100,ScrH() - 40, Color(255,255,255))
- -- Ping
- surface.SetTexture(surface.GetTextureID("gui/silkicons/shield"))
- draw.SimpleText("Ping: "..LocalPlayer():Ping() ,"CustomFont2", ScrW()-100,ScrH() - 27, Color(255,255,255))
- -- Props
- surface.SetTexture(surface.GetTextureID("gui/silkicons/shield"))
- draw.SimpleText("Props: "..LocalPlayer():GetCount( "props" ).."/"..PropLimit,"CustomFont2", ScrW() - 100,ScrH() - 14, Color(255,255,255))
- -- Ammo
- surface.SetTexture(surface.GetTextureID("gui/silkicons/shield"))
- -- surface.DrawTexturedRect(25 + 10,ScrH() - 60,16,16)
- draw.SimpleText( name..": "..ammo.."/"..reserve ,"CustomFont", ScrW() - ScrW() + 1550,ScrH() - 30, Color(255,255,255))
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement