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")
- --[[---------------------------------------------------------
- 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"), "HudSelectionText", ScrW()*0.145, ScrH()-157, Color ( 255, 255, 255, 255), TEXT_ALIGN_CENTER)*/
- --> 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
- --[[---------------------------------------------------------
- Icons
- -----------------------------------------------------------]]
- --> Health Icon & Box
- surface.SetDrawColor (150, 150, 150, 255)
- surface.SetMaterial (IconHealth)
- surface.DrawTexturedRect(ScrW()*0.102, ScrH()-211, 24, 24)
- --> Armor Icon & Box
- surface.SetDrawColor (150, 150, 150, 255)
- surface.SetMaterial (IconArmor)
- surface.DrawTexturedRect(ScrW()*0.110, ScrH()-187, 25, 25)
- -- Salary Icon & Box
- surface.SetDrawColor (0, 0, 0, 255)
- surface.SetMaterial (IconSalary)
- surface.DrawTexturedRect(ScrW()*0.118, ScrH()-161, 25, 25)
- -- Money Icon & Box
- surface.SetDrawColor (0, 0, 0, 255)
- surface.SetMaterial (IconMoney)
- surface.DrawTexturedRect(ScrW()*0.110, ScrH()-135, 25, 25)
- --> Job Icon & Box
- surface.SetDrawColor (0, 0, 0, 255)
- surface.SetMaterial (IconJob)
- surface.DrawTexturedRect(ScrW()*0.102, ScrH()-107, 25, 25)
- -- Weapon Icon & Box
- 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 & Box
- 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)
- --[[---------------------------------------------------------
- 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