SHARE
TWEET

Untitled

a guest Jan 21st, 2020 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local HideOtherThings = {--Write here to hide hud things.If you don't know What should you hide,you can visit here https://wiki.garrysmod.com/page/HUD_Element_List
  2.     ["DarkRP_HUD"] = true,
  3.     ["DarkRP_EntityDisplay"] = true,
  4.     ["DarkRP_LocalPlayerHUD"] = true,
  5.     ["DarkRP_Hungermod"] = true,
  6.     ["DarkRP_Agenda"] = true,
  7.     ["DarkRP_LockdownHUD"] = true,
  8.     ["DarkRP_ArrestedHUD"] = true,
  9.     ["DarkRP_ChatReceivers"] = true,
  10.     ["CHudHealth"] = true,
  11.     ["CHudBattery"] = true
  12. }
  13. surface.CreateFont("HUD", {
  14.     font = "Arial",
  15.     size = ScrW() * 0.01,
  16. })
  17. surface.CreateFont("HUD2", {
  18.     font = "Bahnschrift SemiBold",
  19.     size = ScrW() * 0.015
  20. })
  21. hook.Add( "HUDShouldDraw", "Hiding Other Things", function( name )
  22.     if ( HideOtherThings[ name ] ) then return false end
  23.  
  24.     -- Don't return anything here, it may break other addons that rely on this hook.
  25. end )
  26.  
  27. hook.Add("HUDPaint", "Etkin's HUD", function()
  28.  
  29.     --MATERIALS
  30.     local health_icon = Material("hud/health.png")
  31.     local armor_icon = Material("hud/armor.png")
  32.     local name_icon = Material("hud/name.png")
  33.     local job_icon = Material("hud/job.png")
  34.     local money_icon = Material("hud/money.png")
  35.     local salary_icon = Material("hud/salary.png")
  36.     --/MATERIALS
  37.    
  38.     --VARIABLES
  39.     local health = LocalPlayer():Health()
  40.     local armor = LocalPlayer():Armor()
  41.     local name = LocalPlayer():getDarkRPVar("rpname")
  42.     local job = LocalPlayer():getDarkRPVar("job")
  43.     local money = LocalPlayer():getDarkRPVar("money")
  44.     local salary = LocalPlayer():getDarkRPVar("salary")
  45.     local id = LocalPlayer():SteamID()
  46.     --/VARIABLES
  47.    
  48.     local scrw = ScrW() --for fast coding
  49.     local scrh = ScrH() --for fas coding
  50.     --MAIN DRAWING
  51.         surface.SetDrawColor(0,0,0,200)
  52.         surface.DrawRect(scrw / 2.5,scrh / 1.16,scrw / 4, scrh / 8)
  53.  
  54.         surface.SetDrawColor(0,0,0,255)
  55.         surface.DrawOutlinedRect(scrw / 2.5,scrh / 1.16,scrw / 4, scrh / 8)
  56.  
  57.         surface.SetDrawColor(0,0,0,200)
  58.         surface.DrawRect(scrw / 100,scrh / 1.16,scrw / 4, scrh / 8)
  59.  
  60.         surface.SetDrawColor(0,0,0,255)
  61.         surface.DrawOutlinedRect(scrw / 100,scrh / 1.16,scrw / 4, scrh / 8)
  62.     --/MAIN DRAWING
  63.  
  64.     --MATERIAL PAINTING
  65.         surface.SetMaterial(health_icon)
  66.         surface.SetDrawColor(0,0,0,255)
  67.         surface.DrawTexturedRect(scrw / 70,scrh / 1.15, scrw / 40, scrh / 30)
  68.  
  69.         surface.SetMaterial(armor_icon)
  70.         surface.SetDrawColor(0,0,0,255)
  71.         surface.DrawTexturedRect(scrw / 70,scrh / 1.09, scrw / 40, scrh / 30)
  72.  
  73.         surface.SetMaterial(name_icon)
  74.         surface.SetDrawColor(0,0,0,255)
  75.         surface.DrawTexturedRect(scrw / 2.45,scrh / 1.15, scrw / 40, scrh / 20)
  76.  
  77.         surface.SetMaterial(job_icon)
  78.         surface.SetDrawColor(0,0,0,255)
  79.         surface.DrawTexturedRect(scrw / 2.45,scrh / 1.07, scrw / 40, scrh / 20)
  80.  
  81.         surface.SetMaterial(money_icon)
  82.         surface.SetDrawColor(0,0,0,255)
  83.         surface.DrawTexturedRect(scrw / 1.91,scrh / 1.15, scrw / 40, scrh / 20)
  84.  
  85.         surface.SetMaterial(salary_icon)
  86.         surface.SetDrawColor(0,0,0,255)
  87.         surface.DrawTexturedRect(scrw / 1.9,scrh / 1.06, scrw / 45, scrh / 25)
  88.     --/MATERIAL PAINTING
  89.  
  90.     --VARIABLE PAINTING
  91.         draw.RoundedBox(5,scrw / 20,scrh / 1.146,scrw / 5,scrh / 45,Color(0,0,0,200))
  92.         draw.RoundedBox(5,scrw / 20,scrh / 1.146,math.min(100,health) * scrw * 0.002,scrh / 45,Color(0,200,0,200))
  93.         draw.RoundedBox(5,scrw / 20,scrh / 1.08,scrw / 5,scrh / 45,Color(0,0,0,230))
  94.         draw.RoundedBox(5,scrw / 20,scrh / 1.08,math.min(100,armor) * scrw * 0.002,scrh / 45,Color(0,0,200,230))
  95.  
  96.         draw.DrawText(health.."%","HUD",scrw / 7,scrh / 1.143,Color(255,255,255,255),1)
  97.         draw.DrawText(armor.."%","HUD",scrw / 7,scrh / 1.08,Color(255,255,255,255),1)
  98.         draw.DrawText(id,"HUD2",scrw / 13,scrh / 1.05,Color(255,255,255,255),1)
  99.         draw.DrawText(name,"HUD2",scrw / 2.19,scrh / 1.135,Color(255,255,255,255),1)
  100.         draw.DrawText(job,"HUD2",scrw / 2.19,scrh / 1.055,Color(255,255,255,255),1)
  101.         draw.DrawText(money.."$","HUD2",scrw / 1.7,scrh / 1.135,Color(255,255,255,255),1)
  102.         draw.DrawText(salary.."$","HUD2",scrw / 1.7,scrh / 1.055,Color(255,255,255,255),1)
  103.     --/VARIABLE PAINTING
  104.     end)
  105.  
  106.     if not engine.ActiveGamemode() == "darkrp" then
  107.         hook.Remove("HUDPaint", "Etkin's HUD")
  108.     end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top