Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*---------------------------------------------------------------------------
- HUD ConVars
- ---------------------------------------------------------------------------*/
- local ConVars = {}
- local HUDWidth
- local HUDHeight
- local Color = Color
- local cvars = cvars
- local draw = draw
- local GetConVar = GetConVar
- local Lerp = Lerp
- local localplayer
- local pairs = pairs
- local SortedPairs = SortedPairs
- local string = string
- local surface = surface
- local table = table
- local tostring = tostring
- CreateClientConVar("weaponhud", 0, true, false)
- local function ReloadConVars()
- ConVars = {
- background = {0,0,0,100},
- Healthbackground = {0,0,0,200},
- Healthforeground = {140,0,0,180},
- HealthText = {255,255,255,200},
- Job1 = {0,0,150,200},
- Job2 = {0,0,0,255},
- salary1 = {0,150,0,200},
- salary2 = {0,0,0,255}
- }
- for name, Colour in pairs(ConVars) do
- ConVars[name] = {}
- for num, rgb in SortedPairs(Colour) do
- local CVar = GetConVar(name..num) or CreateClientConVar(name..num, rgb, true, false)
- table.insert(ConVars[name], CVar:GetInt())
- if not cvars.GetConVarCallbacks(name..num, false) then
- cvars.AddChangeCallback(name..num, function() timer.Simple(0,ReloadConVars) end)
- end
- end
- ConVars[name] = Color(unpack(ConVars[name]))
- end
- HUDWidth = (GetConVar("HudW") or CreateClientConVar("HudW", 240, true, false)):GetInt()
- HUDHeight = (GetConVar("HudH") or CreateClientConVar("HudH", 115, true, false)):GetInt()
- if not cvars.GetConVarCallbacks("HudW", false) and not cvars.GetConVarCallbacks("HudH", false) then
- cvars.AddChangeCallback("HudW", function() timer.Simple(0,ReloadConVars) end)
- cvars.AddChangeCallback("HudH", function() timer.Simple(0,ReloadConVars) end)
- end
- end
- ReloadConVars()
- local function formatNumber(n)
- if not n then return "" end
- if n >= 1e14 then return tostring(n) end
- n = tostring(n)
- local sep = sep or ","
- local dp = string.find(n, "%.") or #n+1
- for i=dp-4, 1, -3 do
- n = n:sub(1, i) .. sep .. n:sub(i+1)
- end
- return n
- end
- local Scrw, Scrh, RelativeX, RelativeY
- /*---------------------------------------------------------------------------
- HUD Seperate Elements
- ---------------------------------------------------------------------------*/
- surface.CreateFont( "Info", {
- font = "Bebas Neue",
- size = 25,
- weight = 800,
- antialias = true
- })
- surface.CreateFont( "Info2", {
- font = "Bebas Neue",
- size = 21,
- weight = 800,
- antialias = true
- })
- surface.CreateFont( "Ammo", {
- font = "Bebas",
- size = 65,
- weight = 800,
- antialias = true
- })
- local function DrawLine(x,y,w,h,x2,y2,w2,h2)
- surface.SetDrawColor(0,0,0,255)
- surface.DrawLine(x,ScrH()-y,w,ScrH()-h)
- surface.SetDrawColor(61,61,61,255)
- surface.DrawLine(x2,ScrH()-y2,w2,ScrH()-h2)
- end
- local function DrawPlayerModel()
- draw.RoundedBox(0,20,ScrH()-25,150,15,Color(38,38,38,255)) -- Bottom
- draw.RoundedBox(0,20,ScrH()-160,15,135,Color(38,38,38,255)) -- Left
- draw.RoundedBox(0,155,ScrH()-160,15,135,Color(38,38,38,255)) -- Right
- draw.RoundedBox(0,20,ScrH()-175,150,15,Color(38,38,38,255)) -- Top
- draw.RoundedBox(0,35,ScrH()-160,120,135,Color(54,54,54,255))
- //Inside Box
- // Top
- DrawLine(35,160,155,160,35,159,155,159)
- // Bottom
- DrawLine(35,25,155,25,35,26,155,26)
- // Right
- DrawLine(155,26,155,160,154,26,154,160)
- // Left
- DrawLine(35,25,35,160,36,26,36,160)
- end
- hook.Add("InitPostEntity", "DrawPlayerModel", function()
- iconmodel = vgui.Create("DModelPanel")
- iconmodel:SetModel( LocalPlayer():GetModel())
- function iconmodel:LayoutEntity( Entity ) return end
- iconmodel:SetPos(35, ScrH()-145)
- iconmodel:SetAnimated(false)
- iconmodel:SetSize(120,120)
- iconmodel:SetCamPos( Vector( 20, -5, 65))
- iconmodel:SetLookAt( Vector( 0, 0, 66.5 ) )
- timer.Create("RefreshAvatar", 0.1, 0, function()
- if LocalPlayer():GetModel() ~= iconmodel.Entity:GetModel() then
- iconmodel:Remove()
- iconmodel = vgui.Create("DModelPanel")
- iconmodel:SetPos(35, ScrH()-145)
- iconmodel:SetModel( LocalPlayer():GetModel())
- function iconmodel:LayoutEntity( Entity ) return end
- iconmodel:SetAnimated(false)
- iconmodel:SetSize(120,120)
- iconmodel:SetCamPos( Vector( 20, -5, 65))
- iconmodel:SetLookAt( Vector( 0, 0, 66.5 ) )
- end
- end)
- end)
- local hp = Material("icon16/heart.png")
- local ar = Material("icon16/shield.png")
- local csh = Material("icon16/money_dollar.png")
- local sal = Material("icon16/money.png")
- local jo = Material("icon16/user.png")
- local hun = Material("icon16/pill.png")
- local function DrawInfo()
- local ply = LocalPlayer()
- local health,armor = ply:Health(),ply:Armor()
- local money = formatNumber(ply:getDarkRPVar("money") or 0)
- local salary = (ply:getDarkRPVar("salary") or 0)
- local job = ply:getDarkRPVar("job") or ""
- local hunger = math.Round(ply:getDarkRPVar( "Energy" ) or 0)
- y = 29
- if armor > 0 then
- y = 0
- end
- draw.RoundedBox(0,170,ScrH()-35,25,25,Color(38,38,38,255)) // HP Icon
- draw.RoundedBox(0,195,ScrH()-35,225,25,Color(54,54,54,255)) // Health background
- if health > 0 then
- draw.RoundedBox(0,200,ScrH()-30,math.Clamp(health,0,100)*2.15,15,Color(255,50,50,220)) // Health Bar
- end
- draw.DrawText(health.." %","Info2",210,ScrH()-32,color_white,TEXT_ALIGN_LEFT)
- // Health Front
- DrawLine(195,11,195,35,196,11,196,35)
- surface.SetMaterial(hp)
- surface.SetDrawColor(255,255,255,255)
- surface.DrawTexturedRect(175,ScrH()-30,16,16)
- if armor > 0 then
- draw.RoundedBox(0,170,ScrH()-63,25,25,Color(38,38,38,255)) // AR Icon
- draw.RoundedBox(0,195,ScrH()-63,225,25,Color(54,54,54,255)) // Armor background
- draw.RoundedBox(0,200,ScrH()-58,math.Clamp(armor,0,100)*2.15,15,Color(0,100,250,220)) // Health Bar
- draw.DrawText(armor.." %","Info2",210,ScrH()-60,color_white,TEXT_ALIGN_LEFT)
- // Armor Front
- DrawLine(195,11,195,35,196,11,196,35)
- surface.SetMaterial(ar)
- surface.SetDrawColor(255,255,255,255)
- surface.DrawTexturedRect(175,ScrH()-58,16,16)
- end
- draw.RoundedBox(0,170,ScrH()-91+y,25,25,Color(38,38,38,255)) // CS Icon
- draw.RoundedBox(0,195,ScrH()-91+y,225,25,Color(54,54,54,255)) // Cash background
- draw.DrawText("Wallet: $"..money,"Info",200,ScrH()-90+y,color_white,TEXT_ALIGN_LEFT)
- // Cash Front
- DrawLine(195,11,195,35,196,11,196,35)
- surface.SetMaterial(csh)
- surface.SetDrawColor(255,255,255,255)
- surface.DrawTexturedRect(175,ScrH()-87+y,16,16)
- draw.RoundedBox(0,170,ScrH()-119+y,25,25,Color(38,38,38,255)) // Sal Icon
- draw.RoundedBox(0,195,ScrH()-119+y,225,25,Color(54,54,54,255)) // Sal background
- draw.DrawText("Sallary: $"..salary,"Info",200,ScrH()-117+y,color_white,TEXT_ALIGN_LEFT)
- // Salary Front
- DrawLine(195,11,195,35,196,11,196,35)
- surface.SetMaterial(sal)
- surface.SetDrawColor(255,255,255,255)
- surface.DrawTexturedRect(175,ScrH()-114+y,16,16)
- draw.RoundedBox(0,170,ScrH()-147+y,25,25,Color(38,38,38,255)) // Job Icon
- draw.RoundedBox(0,195,ScrH()-147+y,225,25,Color(54,54,54,255)) // Job background
- draw.DrawText("Job: "..job,"Info",200,ScrH()-145+y,color_white,TEXT_ALIGN_LEFT)
- // Job Front
- DrawLine(195,11,195,35,196,11,196,35)
- surface.SetMaterial(jo)
- surface.SetDrawColor(255,255,255,255)
- surface.DrawTexturedRect(175,ScrH()-142+y,16,16)
- if hunger > 0 then
- draw.RoundedBox(0,170,ScrH()-175+y,25,25,Color(38,38,38,255)) // Hunger Icon
- draw.RoundedBox(0,195,ScrH()-175+y,225,25,Color(54,54,54,255)) // Hunger background
- draw.RoundedBox(0,200,ScrH()-170+y,math.Clamp(hunger,0,100)*2.15,15,Color(250,200,0,220)) // Hunger Bar
- draw.DrawText(hunger.." %","Info2",210,ScrH()-172,color_white,TEXT_ALIGN_LEFT)
- // Hunger Front
- DrawLine(195,11,195,35,196,11,196,35)
- surface.SetMaterial(hun)
- surface.SetDrawColor(255,255,255,255)
- surface.DrawTexturedRect(175,ScrH()-170+y,16,16)
- end
- end
- local function DrawLine2(x,y,w,h,x2,y2,w2,h2)
- surface.SetDrawColor(0,0,0,255)
- surface.DrawLine(ScrW()-x,ScrH()-y,ScrW()-w,ScrH()-h)
- surface.SetDrawColor(61,61,61,255)
- surface.DrawLine(ScrW()-x2,ScrH()-y2,ScrW()-w2,ScrH()-h2)
- end
- local function DrawAmmo()
- local ply = LocalPlayer()
- if !IsValid(ply:GetActiveWeapon()) then return end
- if (ply:GetActiveWeapon():Clip1() == NULL or ply:GetActiveWeapon() == "Camera") then return end
- local mag_left = LocalPlayer():GetActiveWeapon():Clip1()
- local mag_extra = LocalPlayer():GetAmmoCount(ply:GetActiveWeapon():GetPrimaryAmmoType()) // Current Ammunition outside the mag
- if (ply:GetActiveWeapon():GetClass() == "weapon_physcannon") then
- return false
- elseif mag_left == -1 then
- return false
- elseif mag_extra >= 0 then
- draw.RoundedBox(0,ScrW()-300,ScrH()-90,220,80,Color(38,38,38,255)) // Background
- draw.RoundedBox(0,ScrW()-290,ScrH()-80,95,60,Color(54,54,54,255)) // Mag Left
- draw.DrawText(mag_left,"Ammo",ScrW()-240,ScrH()-85,color_white,TEXT_ALIGN_CENTER)
- // Left
- DrawLine2(290,80,290,20,289,80,289,20)
- // Right
- DrawLine2(195,80,195,20,196,80,196,20)
- // Top
- DrawLine2(290,80,195,80,288,79,195,79)
- // Bottom
- DrawLine2(290,20,195,20,288,21,195,21)
- draw.RoundedBox(0,ScrW()-185,ScrH()-80,95,60,Color(54,54,54,255)) // Mag Extra
- draw.DrawText(mag_extra,"Ammo",ScrW()-135,ScrH()-85,color_white,TEXT_ALIGN_CENTER)
- // Left
- DrawLine2(185,80,185,20,184,80,184,20)
- // Right
- DrawLine2(90,80,90,20,91,80,91,20)
- // Top
- DrawLine2(185,80,90,80,183,79,90,79)
- // Bottom
- DrawLine2(185,20,90,20,183,21,90,21)
- end
- end
- local wanted = Material("icon16/star.png")
- local Page = Material("icon16/page_white_text.png")
- CreateConVar("DarkRP_LockDown", 0, {FCVAR_REPLICATED, FCVAR_SERVER_CAN_EXECUTE})
- local function DrawInportantInfo()
- // Wanted
- if LocalPlayer():isWanted() then
- color = Color( math.sin( CurTime() * 2 ) * 255,math.sin( CurTime() * 2 ) * 255,math.sin( CurTime() * 2 ) * 255 )
- else
- color = color_black
- end
- for i=1,5 do
- surface.SetMaterial(wanted)
- surface.SetDrawColor(color)
- surface.DrawTexturedRect(38+(40*i/2),ScrH()-154,14,14)
- end
- // Gun Licence
- if LocalPlayer():getDarkRPVar("HasGunlicense") then
- color = color_white
- else
- color = color_black
- end
- surface.SetMaterial(Page)
- surface.SetDrawColor(color)
- surface.DrawTexturedRect(38, ScrH() - 155, 16, 16)
- // LockDown
- if util.tobool(GetConVarNumber("DarkRP_LockDown")) then
- draw.RoundedBox(0,ScrW()/2-275,0,550,30,Color(38,38,38,math.sin( CurTime() * 2 ) * 255))
- draw.RoundedBox(0,ScrW()/2-265,5,530,20,Color(54,54,54,math.sin( CurTime() * 2 ) * 255))
- local cin = (math.sin(CurTime()) + 1) / 2
- local chatBoxSize = math.floor(ScrH() / 4)
- draw.DrawText(DarkRP.getPhrase("lockdown_started"), "ScoreboardSubtitle", ScrW()/2,5, Color(255,cin * 255,cin * 255,math.sin( CurTime() * 2 ) * 255), TEXT_ALIGN_CENTER)
- end
- end
- local function Agenda()
- local shouldDraw = hook.Call("HUDShouldDraw", GAMEMODE, "DarkRP_Agenda")
- if shouldDraw == false then return end
- local ply = LocalPlayer()
- local agenda = ply:getAgendaTable()
- if not agenda then return end
- draw.RoundedBox(0, 10, 10, 460, 110, Color(54,54,54,255))
- draw.RoundedBox(0, 12, 12, 456, 20, Color(38,38,38,255))
- surface.SetDrawColor(0,0,0,255)
- surface.DrawLine(10,30,470,30)
- surface.SetDrawColor(61,61,61,255)
- surface.DrawLine(10,30,470,30)
- draw.DrawText(agenda.Title, "DarkRPHUD1", 20, 12, color_white)
- draw.RoundedBox(10, 10, 10, 460, 110, Color(0, 0, 0, 155))
- draw.RoundedBox(10, 12, 12, 456, 106, Color(51, 58, 51,100))
- draw.RoundedBox(10, 12, 12, 456, 20, Color(0, 0, 70, 100))
- local text = ply:getDarkRPVar("agenda") or ""
- text = text:gsub("//", "\n"):gsub("\\n", "\n")
- text = DarkRP.textWrap(text, "DarkRPHUD1", 440)
- draw.DrawText(text, "DarkRPHUD1", 20, 12, color_white)
- end
- local function Agenda()
- local shouldDraw = hook.Call("HUDShouldDraw", GAMEMODE, "DarkRP_Agenda")
- if shouldDraw == false then return end
- local DrawAgenda, AgendaManager = DarkRPAgendas[localplayer:Team()], localplayer:Team()
- if not DrawAgenda then
- for k,v in pairs(DarkRPAgendas) do
- if table.HasValue(v.Listeners or {}, localplayer:Team()) then
- DrawAgenda, AgendaManager = DarkRPAgendas[k], k
- break
- end
- end
- end
- if DrawAgenda then
- draw.RoundedBox(0, 10, 10, 460, 110, Color(54,54,54,255))
- draw.RoundedBox(0, 12, 12, 456, 20, Color(38,38,38,255))
- surface.SetDrawColor(0,0,0,255)
- surface.DrawLine(10,30,470,30)
- surface.SetDrawColor(61,61,61,255)
- surface.DrawLine(10,30,470,30)
- draw.DrawText(DrawAgenda.Title, "DarkRPHUD1", 20, 12, color_white)
- local AgendaText = {}
- for k,v in pairs(team.GetPlayers(AgendaManager)) do
- if not v.DarkRPVars then continue end
- table.insert(AgendaText, v:getDarkRPVar("agenda"))
- end
- local text = table.concat(AgendaText, "\n")
- text = text:gsub("//", "\n"):gsub("\\n", "\n")
- text = DarkRP.textWrap(text, "DarkRPHUD1", 440)
- draw.DrawText(text, "DarkRPHUD1", 30, 35, Color(255,255,255,255),0)
- end
- end
- local VoiceChatTexture = surface.GetTextureID("voice/icntlk_pl")
- local function DrawVoiceChat()
- if localplayer.DRPIsTalking then
- local chbxX, chboxY = chat.GetChatBoxPos()
- local Rotating = math.sin(CurTime()*3)
- local backwards = 0
- if Rotating < 0 then
- Rotating = 1-(1+Rotating)
- backwards = 180
- end
- surface.SetTexture(VoiceChatTexture)
- surface.SetDrawColor(ConVars.Healthforeground)
- surface.DrawTexturedRectRotated(ScrW() - 100, chboxY, Rotating*96, 96, backwards)
- end
- end
- local Arrested = function() end
- usermessage.Hook("GotArrested", function(msg)
- local StartArrested = CurTime()
- local ArrestedUntil = msg:ReadFloat()
- Arrested = function()
- if CurTime() - StartArrested <= ArrestedUntil and localplayer:getDarkRPVar("Arrested") then
- draw.DrawText(DarkRP.getPhrase("youre_arrested", math.ceil(ArrestedUntil - (CurTime() - StartArrested))), "DarkRPHUD1", ScrW()/2, ScrH() - ScrH()/12, Color(255,255,255,255), 1)
- elseif not localplayer:getDarkRPVar("Arrested") then
- Arrested = function() end
- end
- end
- end)
- local AdminTell = function() end
- usermessage.Hook("AdminTell", function(msg)
- timer.Destroy("DarkRP_AdminTell")
- local Message = msg:ReadString()
- AdminTell = function()
- draw.RoundedBox(4, 10, 10, ScrW() - 20, 100, Color(0, 0, 0, 200))
- draw.DrawText(DarkRP.getPhrase("listen_up"), "GModToolName", ScrW() / 2 + 10, 10, Color(255, 255, 255, 255), 1)
- draw.DrawText(Message, "ChatFont", ScrW() / 2 + 10, 80, Color(200, 30, 30, 255), 1)
- end
- timer.Create("DarkRP_AdminTell", 10, 1, function()
- AdminTell = function() end
- end)
- end)
- /*---------------------------------------------------------------------------
- Drawing the HUD elements such as Health etc.
- ---------------------------------------------------------------------------*/
- local function DrawHUD()
- localplayer = localplayer and IsValid(localplayer) and localplayer or LocalPlayer()
- if not IsValid(localplayer) then return end
- Scrw, Scrh = ScrW(), ScrH()
- RelativeX, RelativeY = 0, Scrh
- DrawInfo()
- DrawAmmo()
- DrawPlayerModel()
- DrawInportantInfo()
- Agenda()
- DrawVoiceChat()
- Arrested()
- AdminTell()
- end
- /*---------------------------------------------------------------------------
- Entity HUDPaint things -- ZONE DU PROBLEME
- ---------------------------------------------------------------------------*/
- local function DrawPlayerInfo(ply)
- local pos = ply:EyePos()
- pos.z = pos.z + 10 -- The position we want is a bit above the position of the eyes
- pos = pos:ToScreen()
- pos.y = pos.y - 50 -- Move the text up a few pixels to compensate for the height of the text
- if GAMEMODE.Config.showname then
- draw.RoundedBox(0, pos.x-125, pos.y, 250, 72, Color(38,38,38,255))
- draw.RoundedBox(0, pos.x-122.5, pos.y + 2.5, 245, 20, Color(54,54,54,255)) // First
- draw.RoundedBox(0, pos.x-122.5, pos.y + 25.5, 245, 20, Color(54,54,54,255)) // Secondsa
- draw.RoundedBox(0, pos.x-122.5, pos.y + 48.5, 245, 20, Color(54,54,54,255)) // Third
- draw.DrawText(ply:Nick().." / "..ply:GetNWString("usergroup"), "DarkRPHUD2", pos.x + 1, pos.y + 3, Color(0, 0, 0, 255),1)
- draw.DrawText(ply:Nick().." / "..ply:GetNWString("usergroup"), "DarkRPHUD2", pos.x, pos.y + 2, team.GetColor(ply:Team()), 1)
- draw.DrawText(DarkRP.getPhrase("health", ply:Health()), "DarkRPHUD2", pos.x + 1, pos.y + 25, Color(0, 0, 0, 255), 1)
- draw.DrawText(DarkRP.getPhrase("health", ply:Health()), "DarkRPHUD2", pos.x, pos.y + 25, Color(255,255,255,200), 1)
- end
- if GAMEMODE.Config.showjob then
- local teamname = team.GetName(ply:Team())
- draw.DrawText(ply:getDarkRPVar("job") or teamname, "DarkRPHUD2", pos.x + 1, pos.y + 48, Color(0, 0, 0, 255), 1)
- draw.DrawText(ply:getDarkRPVar("job") or teamname, "DarkRPHUD2", pos.x, pos.y + 48, Color(255, 255, 255, 200), 1)
- end
- if ply:getDarkRPVar("HasGunlicense") then
- surface.SetMaterial(Page)
- surface.SetDrawColor(255,255,255,255)
- surface.DrawTexturedRect(pos.x-120, pos.y + 50, 16, 16)
- end
- // Wanted
- if ply:isWanted() then
- color = Color( math.sin( CurTime() * 2 ) * 255,math.sin( CurTime() * 2 ) * 255,math.sin( CurTime() * 2 ) * 255 )
- for i=1,5 do
- surface.SetMaterial(wanted)
- surface.SetDrawColor(color)
- surface.DrawTexturedRect(pos.x-65+(40*i/2), pos.y-15,14,14)
- end
- end
- end
- /*---------------------------------------------------------------------------
- The Entity display: draw HUD information about entities
- ---------------------------------------------------------------------------*/
- local function DrawEntityDisplay()
- local shouldDraw = hook.Call("HUDShouldDraw", GAMEMODE, "DarkRP_EntityDisplay")
- if shouldDraw == false then return end
- local shootPos = localplayer:GetShootPos()
- local aimVec = localplayer:GetAimVector()
- for k, ply in pairs(player.GetAll()) do
- if not ply:Alive() then continue end
- local hisPos = ply:GetShootPos()
- if GAMEMODE.Config.globalshow and ply ~= localplayer then
- DrawPlayerInfo(ply)
- -- Draw when you're (almost) looking at him
- elseif not GAMEMODE.Config.globalshow and hisPos:Distance(shootPos) < 300 then
- local pos = hisPos - shootPos
- local unitPos = pos:GetNormalized()
- if unitPos:Dot(aimVec) > 0.95 then
- local trace = util.QuickTrace(shootPos, pos, localplayer)
- if trace.Hit and trace.Entity ~= ply then return end
- DrawPlayerInfo(ply)
- end
- end
- end
- local tr = localplayer:GetEyeTrace()
- if IsValid(tr.Entity) and tr.Entity:isKeysOwnable() and tr.Entity:GetPos():Distance(localplayer:GetPos()) < 200 then
- tr.Entity:drawOwnableInfo()
- end
- end
- /*---------------------------------------------------------------------------
- Drawing death notices
- ---------------------------------------------------------------------------*/
- function GM:DrawDeathNotice(x, y)
- if not GAMEMODE.Config.showdeaths then return end
- self.BaseClass:DrawDeathNotice(x, y)
- end
- /*---------------------------------------------------------------------------
- Display notifications
- ---------------------------------------------------------------------------*/
- local function DisplayNotify(msg)
- local txt = msg:ReadString()
- GAMEMODE:AddNotify(txt, msg:ReadShort(), msg:ReadLong())
- surface.PlaySound("buttons/lightswitch2.wav")
- -- Log to client console
- print(txt)
- end
- usermessage.Hook("_Notify", DisplayNotify)
- /*---------------------------------------------------------------------------
- Remove some elements from the HUD in favour of the DarkRP HUD
- ---------------------------------------------------------------------------*/
- function GM:HUDShouldDraw(name)
- if name == "CHudHealth" or
- name == "CHudBattery" or
- name == "CHudSuitPower" or
- name == "CHudAmmo" or
- name == "CHudSecondaryAmmo" or
- (HelpToggled and name == "CHudChat") then
- return false
- else
- return true
- end
- end
- /*---------------------------------------------------------------------------
- Disable players' names popping up when looking at them
- ---------------------------------------------------------------------------*/
- function GM:HUDDrawTargetID()
- return false
- end
- /*---------------------------------------------------------------------------
- Actual HUDPaint hook
- ---------------------------------------------------------------------------*/
- function GM:HUDPaint()
- DrawHUD()
- DrawEntityDisplay()
- self.BaseClass:HUDPaint()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement