Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[---------------------------------------------------------
- Icons
- -----------------------------------------------------------]]
- local IconHexagon = Material("overwatchhud/hexagon.png", "smooth unlitgeneric")
- local IconHexagon2 = Material("overwatchhud/filledhexagon.png", "smooth unlitgeneric")
- local IconHealth = Material ("overwatchhud/health.png", "smooth unlitgeneric")
- local IconArmor = Material ("overwatchhud/armor.png", "smooth unlitgeneric")
- local IconWeapon = Material ("overwatchhud/weapon.png", "smooth unlitgeneric")
- local IconAmmo = Material ("overwatchhud/ammo.png", "smooth unlitgeneric")
- local IconSalary = Material ("overwatchhud/salary.png", "smooth unlitgeneric")
- local IconMoney = Material ("overwatchhud/money.png", "smooth unlitgeneric")
- local IconJob = Material ("overwatchhud/job.png", "smooth unlitgeneric")
- local IconLockdown = Material ("overwatchhud/lockdown.png", "smooth unlitgeneric")
- --[[---------------------------------------------------------
- Noget jeg ikke ved hvad hedder
- -----------------------------------------------------------]]
- local fisse = {
- "weapon_physcannon",
- ""
- }
- hook.Add("HUDPaint", "Pik", function(ply)
- --[[---------------------------------------------------------
- Top Middle Bar
- -----------------------------------------------------------]]
- draw.RoundedBox (3, ScrW()*0.5-170, ScrH()*0, 340, 70, Color ( 0, 170, 255, 125) )
- draw.RoundedBox (3, ScrW()*0.5-160, ScrH()*0, 320, 60, Color ( 0, 180, 255, 150) )
- draw.RoundedBox (3, ScrW()*0.5-150, ScrH()*0, 300, 50, Color ( 0, 190, 255, 255) )
- draw.RoundedBox (3, ScrW()*0.5-140, ScrH()*0, 280, 40, Color ( 0, 0, 0, 255) )
- draw.DrawText ("Logo/Community Name ", "HudSelectionText", ScrW()*0.5, ScrH()*0.01, Color ( 255, 255, 255, 255), TEXT_ALIGN_CENTER)
- --[[---------------------------------------------------------
- Hexagons around the Playermodel
- -----------------------------------------------------------]]
- --> Outside Hexagon
- surface.SetDrawColor (0, 130, 178, 125)
- surface.SetMaterial (IconHexagon)
- surface.DrawTexturedRect(ScrW()*0.0135, ScrH()*0.774, 190, 200)
- --> Middle Hexagon
- surface.SetDrawColor (0, 130, 178, 150)
- surface.SetMaterial (IconHexagon)
- surface.DrawTexturedRect(ScrW()*0.0215, ScrH()*0.7875, 160, 170)
- --> First Hexagon
- surface.SetDrawColor (0, 155, 255, 255)
- surface.SetMaterial (IconHexagon)
- surface.DrawTexturedRect(ScrW()*0.027, ScrH()*0.797, 140, 150)
- -- Black Hexagon
- surface.SetDrawColor (119, 87, 0, 255)
- surface.SetMaterial (IconHexagon2)
- surface.DrawTexturedRect(ScrW()*0.035, ScrH()*0.811, 110, 120)
- --[[---------------------------------------------------------
- Health, Armor, Salary, Money, Job & Weapon/Ammo
- -----------------------------------------------------------]]
- --> Health
- local HealthValue = LocalPlayer():Health()*1.464 or 0
- draw.RoundedBox(5, ScrW()*0.117, ScrH()-209, 150, 20, Color( 0, 0, 0, 200 ) )
- if (HealthValue > 0) then
- draw.RoundedBox(5, ScrW()*0.118, ScrH()-207, HealthValue, 16, Color( 255, 0, 0, 150 ) )
- end
- --> Armor
- local ArmorValue = LocalPlayer():Armor()*1.464 or 0
- draw.RoundedBox(5, ScrW()*0.125, ScrH()-184, 150, 20, Color( 0, 0, 0, 200 ) )
- if (ArmorValue > 0) then
- draw.RoundedBox(5, ScrW()*0.126, ScrH()-182, ArmorValue, 16, Color( 0, 0, 255, 150 ) )
- end
- --> Salary
- draw.RoundedBox(5, ScrW()*0.134, ScrH()-158, 150, 20, Color( 0, 0, 0, 200 ) )
- draw.DrawText("$"..(LocalPlayer():getDarkRPVar("salary") or 0), "HudSelectionText", ScrW()*0.136, ScrH()-157, Color ( 255, 255, 255, 255), TEXT_ALIGN_LEFT)
- --> Money
- draw.RoundedBox(5, ScrW()*0.125, ScrH()-132, 150, 20, Color( 0, 0, 0, 200 ) )
- draw.DrawText("$"..(LocalPlayer():getDarkRPVar("money") or 0), "HudSelectionText", ScrW()*0.128, ScrH()-131, Color ( 255, 255, 255, 255), TEXT_ALIGN_LEFT)
- --> Job
- draw.RoundedBox(5, ScrW()*0.117, ScrH()-103, 150, 20, Color( 0, 0, 0, 200 ) )
- draw.DrawText(""..(LocalPlayer():getDarkRPVar("job") or ""), "HudSelectionText", ScrW()*0.12, ScrH()-102, Color ( 255, 255, 255, 255), TEXT_ALIGN_LEFT)
- --> Weapon & Ammo
- if ( IsValid( LocalPlayer():GetActiveWeapon() ) ) then
- draw.RoundedBox(4, ScrW()*0.9, ScrH()-145, 150, 35, Color( 0, 0, 0, 200 ) )
- draw.DrawText(""..LocalPlayer():GetActiveWeapon():GetPrintName(), "HudSelectionText", ScrW()*0.937, ScrH()-136, Color( 255, 255, 255, 255), TEXT_ALIGN_CENTER)
- if not (LocalPlayer():GetActiveWeapon():Clip1() == -1 or LocalPlayer():GetActiveWeapon():GetClass() == "weapon_physcannon") then
- draw.RoundedBox(4, ScrW()*0.9, ScrH()-100, 150, 35, Color( 0, 0, 0, 200 ) )
- if(LocalPlayer():GetActiveWeapon():Clip1() == -1 or LocalPlayer():GetActiveWeapon():GetClass() == "weapon_physcannon") then
- surface.SetDrawColor(255, 255, 255, 255)
- else
- draw.DrawText( ""..LocalPlayer():GetActiveWeapon():Clip1().."/"..LocalPlayer():GetAmmoCount(LocalPlayer():GetActiveWeapon():GetPrimaryAmmoType()), "HudSelectionText", ScrW()*0.94, ScrH()-90, Color( 255, 255, 255, 255), TEXT_ALIGN_CENTER)
- end
- end
- end
- --[[---------------------------------------------------------
- Lockdown
- -----------------------------------------------------------]]
- if GetGlobalBool("DarkRP_LockDown") then
- draw.RoundedBox (5, ScrW()*0.038, ScrH()-260, 95, 20, Color (0, 0, 0, 200))
- draw.DrawText ("LOCKDOWN", "HudSelectionText", ScrW()*0.0625, ScrH()-259, Color (255, 255, 255, 255), TEXT_ALIGN_CENTER)
- --> Lockdown Icon
- surface.SetDrawColor (0, 0, 0, 255)
- surface.SetMaterial (IconLockdown)
- surface.DrawTexturedRect(ScrW()*0.024, ScrH()-263, 25, 25)
- end
- --[[---------------------------------------------------------
- Icons
- -----------------------------------------------------------]]
- --> Health Icon
- surface.SetDrawColor (150, 150, 150, 255)
- surface.SetMaterial (IconHealth)
- surface.DrawTexturedRect(ScrW()*0.102, ScrH()-211, 24, 24)
- --> Armor Icon
- surface.SetDrawColor (150, 150, 150, 255)
- surface.SetMaterial (IconArmor)
- surface.DrawTexturedRect(ScrW()*0.110, ScrH()-187, 25, 25)
- -- Salary Icon
- surface.SetDrawColor (0, 0, 0, 255)
- surface.SetMaterial (IconSalary)
- surface.DrawTexturedRect(ScrW()*0.118, ScrH()-161, 25, 25)
- --> Money Icon
- surface.SetDrawColor (0, 0, 0, 255)
- surface.SetMaterial (IconMoney)
- surface.DrawTexturedRect(ScrW()*0.110, ScrH()-135, 25, 25)
- --> Job Icon
- surface.SetDrawColor (0, 0, 0, 255)
- surface.SetMaterial (IconJob)
- surface.DrawTexturedRect(ScrW()*0.102, ScrH()-107, 25, 25)
- --> Weapon Icon
- if ( IsValid( LocalPlayer():GetActiveWeapon() ) ) then
- surface.SetDrawColor (255, 255, 255, 255)
- surface.SetMaterial (IconWeapon)
- surface.DrawTexturedRect(ScrW()*0.885, ScrH()-143, 25, 25)
- --> Ammo Icon
- if not (LocalPlayer():GetActiveWeapon():Clip1() == -1 or LocalPlayer():GetActiveWeapon():GetClass() == "weapon_physcannon") then
- surface.SetDrawColor (255, 255, 255, 255)
- surface.SetMaterial (IconAmmo)
- surface.DrawTexturedRect(ScrW()*0.886, ScrH()-92, 20, 20)
- end
- end
- end)
- --[[---------------------------------------------------------
- Agenda - Andreas Lugter af sæd
- -----------------------------------------------------------]]
- local agendaText
- local function Agenda()
- local shouldDraw = hook.Call("HUDShouldDraw", GAMEMODE, "DarkRP_Agenda")
- if shouldDraw == false then return end
- local agenda = localplayer:getAgendaTable()
- if not agenda then return end
- agendaText = agendaText or DarkRP.textWrap((localplayer:getDarkRPVar("agenda") or ""):gsub("//", "\n"):gsub("\\n", "\n"), "DarkRPHUD1", 440)
- draw.RoundedBox(10, 10, 10, 460, 110, colors.gray1)
- draw.RoundedBox(10, 12, 12, 456, 106, colors.gray2)
- draw.RoundedBox(10, 12, 12, 456, 20, colors.darkred)
- draw.DrawNonParsedText(agenda.Title, "DarkRPHUD1", 30, 12, colors.red, 0)
- draw.DrawNonParsedText(agendaText, "DarkRPHUD1", 30, 35, colors.white, 0)
- end
- hook.Add("DarkRPVarChanged", "agendaHUD", function(ply, var, _, new)
- if ply ~= localplayer then return end
- if var == "agenda" and new then
- agendaText = DarkRP.textWrap(new:gsub("//", "\n"):gsub("\\n", "\n"), "DarkRPHUD1", 440)
- else
- agendaText = nil
- end
- if var == "salary" then
- salaryText = DarkRP.getPhrase("salary", DarkRP.formatMoney(new), "")
- end
- if var == "job" or var == "money" then
- JobWalletText = string.format("%s\n%s",
- DarkRP.getPhrase("job", var == "job" and new or localplayer:getDarkRPVar("job") or ""),
- DarkRP.getPhrase("wallet", var == "money" and DarkRP.formatMoney(new) or DarkRP.formatMoney(localplayer:getDarkRPVar("money")), "")
- )
- end
- end)
- --[[---------------------------------------------------------
- Playermodel
- -----------------------------------------------------------]]
- hook.Add("HUDPaint", "PlayerModel", function( )
- local _p = LocalPlayer( );
- if ( !IsValid( _p ) ) then return; end
- local _model = _p:GetModel( );
- if ( !PlayerModel || !ispanel( PlayerModel ) ) then
- PlayerModel = vgui.Create( "DModelPanel" );
- PlayerModel:SetModel( _model );
- PlayerModel.__Model = _model;
- PlayerModel:SetPos( 88, ScrH()-225 );
- PlayerModel:SetAnimated( false );
- PlayerModel.bAnimated = false;
- PlayerModel:SetSize( 66, 120 )
- PlayerModel:SetCamPos( Vector( 16, 0, 65 ) );
- PlayerModel:SetLookAt( Vector( 0, 0, 65 ) );
- PlayerModel:ParentToHUD( );
- end
- function PlayerModel:LayoutEntity(_model)
- end
- if ( _p:GetModel( ) != PlayerModel.__Model ) then
- PlayerModel:SetModel( _model );
- PlayerModel.__Model = _model;
- end
- end );
- --[[---------------------------------------------------------
- Hiding the default scoreboard
- -----------------------------------------------------------]]
- local hide = {
- CHudHealth = true,
- CHudBattery = true,
- CHudAmmo = true,
- CHudSecondaryAmmo = true,
- }
- --[[---------------------------------------------------------
- Noget jeg ikke ved hvad hedder2.0
- -----------------------------------------------------------]]
- hook.Add("HUDShouldDraw", "Lort", function(ply)
- if (hide[ ply ]) then return false end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement