Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- surface.CreateFont( "slawer_scoreboard_30", {
- font = "Roboto",
- extended = false,
- size = 22,
- weight = 700,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- } )
- surface.CreateFont( "SimpleScoreboard1", {
- font = "Roboto",
- extended = false,
- size = 30,
- weight = 500,
- blursize = 0,
- scanlines = 0,
- antialias = true,
- })
- local blur = Material("pp/blurscreen")
- local function DrawBlur(panel, amount)
- local x, y = panel:LocalToScreen(0, 0)
- local scrW, scrH = ScrW(), ScrH()
- surface.SetDrawColor(255, 255, 255)
- surface.SetMaterial(blur)
- for i = 1, 3 do
- blur:SetFloat("$blur", (i / 3) * (amount or 6))
- blur:Recompute()
- render.UpdateScreenEffectTexture()
- surface.DrawTexturedRect(x * -1, y * -1, scrW, scrH)
- end
- end
- local blur = Material("pp/blurscreen")
- local function DrawBlur2( p, a, d )
- local x, y = p:LocalToScreen(0, 0)
- surface.SetDrawColor( 255, 255, 255 )
- surface.SetMaterial( blur )
- for i = 1, d do
- blur:SetFloat( "$blur", (i / d ) * ( a ) )
- blur:Recompute()
- render.UpdateScreenEffectTexture()
- surface.DrawTexturedRect( x * -1, y * -1, ScrW(), ScrH() )
- end
- end
- local function drawRectOutline( x, y, w, h, color )
- surface.SetDrawColor( color )
- surface.DrawOutlinedRect( x, y, w, h )
- end
- hook.Add("ScoreboardShow","dqzdzq", function()
- if IsValid(scoframe) then return end
- scoframe = vgui.Create("DFrame")
- scoframe:SetSize(800,400)
- scoframe:Center()
- gui.EnableScreenClicker(true)
- scoframe:SetTitle("")
- scoframe:ShowCloseButton(false)
- scoframe:SetDraggable(false)
- scoframe.Paint = function(s,w,h)
- DrawBlur(s,5)
- draw.RoundedBox(0, 0, 50, w, 1, (Color(255,255,255,50)))
- drawRectOutline(0, 0, w, h, (Color(255,255,255,50)))
- draw.SimpleText(GetHostName(),"SimpleScoreboard1",600, 10, Color(255,255,255,255),TEXT_ALIGN_CENTER)
- end
- local ssettings = vgui.Create( "DImageButton", scoframe )
- ssettings:SetPos( 1180, 5)
- ssettings:SetImage( "icon16/cog.png" )
- ssettings:SizeToContents()
- ssettings.DoClick = function()
- local frameS = vgui.Create("DPanel", scoframe)
- frameS:SetSize(400, 48)
- frameS:SetPos(775, 1)
- frameS.Paint = function(self, w, h)
- DrawBlur2(self, 3, 6)
- draw.RoundedBox(0, 0, 0, w, h, Color(0, 0, 0, 80))
- end
- local ButtonCU = vgui.Create("DButton", frameS)
- ButtonCU:SetSize(90, 40)
- ButtonCU:SetPos(5, 5)
- ButtonCU:SetText("Clean UP")
- ButtonCU:SetTextColor(Color(255,255, 255))
- ButtonCU.Paint = function(self, w, h)
- DrawBlur2(self, 3, 6)
- draw.RoundedBox(0, 0, 0, w, h, Color(0, 0, 0, 100))
- drawRectOutline(0, 0, w, h, Color(255, 255, 255))
- end
- function ButtonCU.DoClick()
- LocalPlayer():ConCommand("_Fadmin cleanup")
- end
- local ButtonSS = vgui.Create("DButton", frameS)
- ButtonSS:SetSize(95, 40)
- ButtonSS:SetPos(100, 5)
- ButtonSS:SetText("Stop Sound")
- ButtonSS:SetTextColor(Color(255,255, 255))
- ButtonSS.Paint = function(self, w, h)
- DrawBlur2(self, 3, 6)
- draw.RoundedBox(0, 0, 0, w, h, Color(0, 0, 0, 100))
- drawRectOutline(0, 0, w, h, Color(255, 255, 255))
- end
- function ButtonSS.DoClick()
- LocalPlayer():ConCommand("_Fadmin stopsounds")
- end
- local ButtonCD = vgui.Create("DButton", frameS)
- ButtonCD:SetSize(95, 40)
- ButtonCD:SetPos(200, 5)
- ButtonCD:SetText("Clear Decal")
- ButtonCD:SetTextColor(Color(255,255, 255))
- ButtonCD.Paint = function(self, w, h)
- DrawBlur2(self, 3, 6)
- draw.RoundedBox(0, 0, 0, w, h, Color(0, 0, 0, 100))
- drawRectOutline(0, 0, w, h, Color(255, 255, 255))
- end
- function ButtonCD.DoClick()
- LocalPlayer():ConCommand("_Fadmin cleardecals")
- end
- local ButtonRC = vgui.Create("DButton", frameS)
- ButtonRC:SetSize(95, 40)
- ButtonRC:SetPos(300 , 5)
- ButtonRC:SetText("RCon")
- ButtonRC:SetTextColor(Color(255,255, 255))
- ButtonRC.Paint = function(self, w, h)
- DrawBlur2(self, 3, 6)
- draw.RoundedBox(0, 0, 0, w, h, Color(0, 0, 0, 100))
- drawRectOutline(0, 0, w, h, Color(255, 255, 255))
- end
- function ButtonRC.DoClick()
- LocalPlayer():ConCommand("_Fadmin rcon")
- end
- end
- local Scroll = vgui.Create( "DScrollPanel", scoframe )
- Scroll:SetSize( scoframe:GetWide() - 4 + 17, scoframe:GetTall() - 28 )
- Scroll:SetPos( 2, 52 )
- local List = vgui.Create( "DIconLayout", Scroll )
- List:SetSize( scoframe:GetWide() - 2, 200 )
- List:SetPos( 0, 0 )
- List:SetSpaceY( 3 )
- List:SetSpaceX( 100 )
- for k, v in pairs(player.GetAll()) do
- local ppanel = List:Add( "DPanel")
- ppanel:SetSize(796, 50 )
- ppanel.Paint = function(s,w,h)
- local AvatarP = vgui.Create("AvatarImage", ppanel)
- AvatarP:SetSize(50, 46)
- AvatarP:SetPos(2, 2 )
- AvatarP:SetPlayer(self, 64)
- draw.RoundedBox(0,0,0,w,h,Color(0,0,0, 150))
- draw.SimpleText(v:GetName(),"slawer_scoreboard_30",55,2,Color(230,230,230))
- draw.SimpleText(v:getDarkRPVar("job"),"slawer_scoreboard_30",w/2 + 30,15,Color(230,230,230),TEXT_ALIGN_CENTER)
- draw.SimpleText("Ping:","slawer_scoreboard_30",w - 110,15,Color(230,230,230),TEXT_ALIGN_CENTER)
- if v:Ping() >= 100 then
- if v:Ping() >= 175 then
- if v:Ping() >= 230 then
- draw.SimpleText(v:Ping(),"slawer_scoreboard_30",w - 25,15,Color(230,50,50),TEXT_ALIGN_CENTER)
- else
- draw.SimpleText(v:Ping(),"slawer_scoreboard_30",w - 25,15,Color(255,150,50),TEXT_ALIGN_CENTER)
- end
- else
- draw.SimpleText(v:Ping(),"slawer_scoreboard_30",w - 25,15,Color(230,230,50),TEXT_ALIGN_CENTER)
- end
- else
- draw.SimpleText(v:Ping(),"slawer_scoreboard_30",w - 25,15,Color(50,230,50),TEXT_ALIGN_CENTER)
- end
- end
- end
- return false
- end)
- hook.Add("ScoreboardHide","dqzdzq", function()
- if not IsValid(scoframe) then return end
- scoframe:Close()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement