Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ScoreFrame
- function ScoreboardShow()
- if !IsValid(ScoreFrame) then
- ScoreFrame = vgui.Create( "DFrame" )
- ScoreFrame:SetSize(1100, 700)
- ScoreFrame:Center()
- ScoreFrame:SetDraggable(false)
- ScoreFrame:SetTitle("")
- ScoreFrame:ShowCloseButton(false)
- ScoreFrame.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 0, 0, 0, 150 ) )
- draw.RoundedBox( 0, 0, 30, w, 2, Color( 0, 0, 0, 200) )
- draw.RoundedBox( 0, 0, 0, w, 30, Color( 0, 0, 0, 175 ) )
- draw.SimpleText("Berger's Scoreboard", "Trebuchet24", 0, 0, Color( 255, 255, 255, 255 ) )
- draw.SimpleText(os.date("%H:%M:%S - %d/%m/%Y"), "Trebuchet24", 900, 0, Color( 255, 255, 255, 255 ) )
- end
- local Skill1 = vgui.Create("DLabel",ScoreFrame)
- Skill1:SetPos( 90, 40 )
- Skill1:SetText( "Name" )
- Skill1:SetFont( "Trebuchet" )
- local Skill2 = vgui.Create("DLabel",ScoreFrame)
- Skill2:SetPos( 300, 40 )
- Skill2:SetText( "Job" )
- Skill2:SetFont( "Trebuchet18" )
- local Skill3 = vgui.Create("DLabel",ScoreFrame)
- Skill3:SetPos( 550, 40 )
- Skill3:SetText( "Kills" )
- Skill3:SetFont( "Trebuchet18" )
- local Skill4 = vgui.Create("DLabel",ScoreFrame)
- Skill4:SetPos( 650, 40 )
- Skill4:SetText( "Deaths" )
- Skill4:SetFont( "Trebuchet18" )
- local Skill5 = vgui.Create("DLabel",ScoreFrame)
- Skill5:SetPos( 900, 40 )
- Skill5:SetText( "Ping" )
- Skill5:SetFont( "Trebuchet18" )
- local Skill6 = vgui.Create("DLabel",ScoreFrame)
- Skill6:SetPos( 1000, 40 )
- Skill6:SetText( "Rank" )
- Skill6:SetFont( "Trebuchet18" )
- local Skill7 = vgui.Create("DLabel",ScoreFrame)
- Skill7:SetPos( 750, 40 )
- Skill7:SetText( "Playtime" )
- Skill7:SetFont( "Trebuchet18" )
- local ScoreScroll = vgui.Create( "DScrollPanel", ScoreFrame )
- ScoreScroll:Dock( FILL )
- local scrollbar = ScoreScroll:GetVBar()
- function scrollbar:Paint( w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 0, 0, 0, 150 ) )
- end
- function scrollbar.btnUp:Paint( w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 255, 255, 255 ) )
- end
- function scrollbar.btnDown:Paint( w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 255, 255, 255, 255 ) )
- end
- function scrollbar.btnGrip:Paint( w, h )
- draw.RoundedBox( 0, 0, 0, w, h, Color( 255, 255, 255, 130 ) )
- end
- ScoreLayout = vgui.Create( "DListLayout", ScoreScroll )
- ScoreLayout:SetSize(ScoreFrame:GetWide()-10,ScoreScroll:GetTall())
- ScoreLayout:SetPos(0,50)
- end
- if IsValid(ScoreFrame) then
- ScoreLayout:Clear()
- for k,v in pairs(player.GetAll()) do
- PlayerList1 = vgui.Create("Button",ScoreLayout)
- PlayerList1:SetSize(ScoreLayout:GetWide(), 40)
- PlayerList1:SetPos(0,0)
- PlayerList1:SetText("")
- PlayerList1.Paint = function( self, w, h )
- draw.RoundedBox( 0, 0, 0, w, 36, team.GetColor(v:Team() ) )
- if !v:Alive() then return draw.SimpleText("PLAYER IS DEATH", "Trebuchet24", 500, 0, Color( 255, 255, 255, 255 ) ) end
- draw.SimpleText(v:Name(), "Trebuchet24", 60, 0, Color( 255, 255, 255, 255 ) )
- draw.SimpleText(team.GetName(v:Team()), "Trebuchet24", 300, 0, Color( 255, 255, 255, 255 ) )
- draw.SimpleText(v:Frags(), "Trebuchet24", 550, 0, Color( 255, 255, 255, 255 ) )
- draw.SimpleText(v:Deaths(), "Trebuchet24", 650, 0, Color( 255, 255, 255, 255 ) )
- draw.SimpleText(v:Ping(), "Trebuchet24", 900, 0, Color( 255, 255, 255, 255 ) )
- draw.SimpleText(v:GetNWInt( "TotalUTime" ).." hours", "Trebuchet24", 750, 0, Color( 255, 255, 255, 255 ) )
- draw.SimpleText(v:GetNWString("usergroup"), "Trebuchet24", 950, 0, Color( 255, 255, 255, 255 ) )
- end
- PlayerList1.DoClick = function( )
- local ScoreMenu = DermaMenu()
- ScoreMenu:AddOption( "Spectate", function() RunConsoleCommand("ulx","spectate", v:Nick()) end )
- local ScoreMenuOption = ScoreMenu:AddSubMenu( "Teleportation" )
- ScoreMenuOption:AddOption( "Teleport", function() RunConsoleCommand("ulx","teleport", v:Nick()) end )
- ScoreMenuOption:AddOption( "Goto", function() RunConsoleCommand("ulx","goto", v:Nick()) end )
- local ScoreMenuOption = ScoreMenu:AddSubMenu( "Freeze/Unfreeze" )
- ScoreMenuOption:AddOption( "Freeze", function() RunConsoleCommand("ulx","freeze", v:Nick()) end)
- ScoreMenuOption:AddOption( "Unfreeze", function() RunConsoleCommand("ulx","unfreeze", v:Nick()) end)
- ScoreMenu:Open( gui.MouseX(), gui.MouseY())
- end
- local ScoreAvatar = vgui.Create( "AvatarImage", PlayerList1 )
- ScoreAvatar:SetSize( 30, 30 )
- ScoreAvatar:SetPos( 4, 3 )
- ScoreAvatar:SetPlayer( v, 64 )
- end
- ScoreFrame:Show()
- ScoreFrame:MakePopup()
- ScoreFrame:SetKeyboardInputEnabled(true)
- for k,v in pairs(player.GetAll()) do
- table1 = {team.GetPlayers(v:Team())}
- table.SortByMember( table1, "Name" )
- end
- end
- end
- hook.Add( "ScoreboardShow", "ScoreboardShow", ScoreboardShow )
- function ScoreboardHide()
- if IsValid(ScoreFrame) then
- ScoreFrame:Hide()
- end
- end
- hook.Add( "ScoreboardHide", "dwadwawda", ScoreboardHide )
- hook.Add( "ScoreboardShow", "Idk", function()
- return false
- end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement