Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ScoreboardShow()
- GAMEMODE.ShowScoreboard = true
- gui.EnableScreenClicker( true )
- return true
- end
- hook.Add( "ScoreboardShow", "Show", ScoreboardShow )
- function ScoreboardHide()
- GAMEMODE.ShowScoreboard = false
- end
- hook.Add( "ScoreboardHide", "Hide", ScoreboardHide )
- bcol = Color( 100, 125, 255, 225 )
- scol = Color( 255, 255, 100, 255 )
- x = 15
- y = 150
- w = 60
- h = 20
- b = 5
- local Selected = "General"
- function HUDDrawScoreBoard()
- if not GAMEMODE.ShowScoreboard then return true end
- draw.RoundedBox( 0, x + 65 - b, y - b, w + 335 + (65*2), 20, jc_color_bg )
- for i = 1, 3 do
- local Tabs = {
- "General",
- "Status",
- "All",
- }
- draw.RoundedBox( 0, x + (65 * i), y, w, 15, bcol )
- DrawTextOutlined( Tabs[i] , "Trebuchet18", x + 3 + (65 * i), y-1, Color( 255, 255, 255, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) )
- if Selected == Tabs[i] then
- surface.SetDrawColor( 255, 255, 255, 125 )
- surface.SetTexture(surface.GetTextureID("gui/gradient_down"))
- surface.DrawTexturedRect(x + (65 * i), y, w, 15)
- end
- if CursorPos( x + (65 * i), y, w, 15 ) then
- draw.RoundedBox( 0, x + (65 * i), y, w, 15, Color( 255, 255, 255, 60 ) )
- if input.MousePress( MOUSE_LEFT ) then
- Selected = Tabs[i]
- end
- end
- for k,v in pairs( player.GetAll() ) do
- if CursorPos( x + 63, y + 5 + (k * 15), w + 327 + (65*2), 16 ) then
- draw.RoundedBox( 0, x + 64, y + 6 + (k * 15), w + 325 + (65*2), 15, Color( 255, 255, 255, 25 ) )
- end
- props = (
- v:GetCount( "props" ) +
- v:GetCount( "ragdolls" ) +
- v:GetCount( "effects" ) +
- v:GetCount( "vehicles" ) +
- v:GetCount( "npcs" ) +
- v:GetCount( "hoverballs" ) +
- v:GetCount( "thrusters" ) +
- v:GetCount( "balloons" ) +
- v:GetCount( "buttons" ) +
- v:GetCount( "dynamite" ) +
- v:GetCount( "sents" ) +
- v:GetCount( "lights" ) +
- v:GetCount( "lamps" )
- )
- DrawTextOutlined("Ping: "..v:Ping(), "Trebuchet18", x + 525, (y + b - 1) + (k * 15), scol, TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) )
- if Selected == "General" then
- DrawTextOutlined(v:Nick(), "Trebuchet18", x + 66, (y + b - 1) + (k * 15), team.GetColor(v:Team()), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) )
- if gamemode.Get( "sandbox" ) then
- DrawTextOutlined("Props: "..props, "Trebuchet18", x + 485, (y + b - 1) + (k * 15), scol, TEXT_ALIGN_CENTER, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) )
- end
- elseif Selected == "Status" then
- DrawTextOutlined(v:Nick(), "Trebuchet18", x + 66, (y + b - 1) + (k * 15), team.GetColor(v:Team()), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) )
- if v:IsAdmin() then
- DrawPTextOutlined("[Admin]", "Trebuchet18", x + 485, (y + b - 1) + (k * 15), Color( 255, 0, 0, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) )
- else
- DrawTextOutlined("[Guest]", "Trebuchet18", x + 485, (y + b - 1) + (k * 15), Color( 0, 195, 25, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) )
- end
- elseif Selected == "All" then
- DrawTextOutlined(v:Nick(), "Trebuchet18", x + 88, (y + b - 1) + (k * 15), team.GetColor(v:Team()), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) )
- if v:IsAdmin() then
- DrawPTextOutlined("[A]", "Trebuchet18", x + 66, (y + b - 1) + (k * 15), Color( 255, 0, 0, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) )
- else
- DrawTextOutlined("[G]", "Trebuchet18", x + 66, (y + b - 1) + (k * 15), Color( 0, 195, 25, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) )
- end
- if gamemode.Get( "sandbox" ) then --remove this line if you want this on another gamemode or change "sandbox" to the gamemode name
- DrawTextOutlined("Props: "..props, "Trebuchet18", x + 335, (y + b - 1) + (k * 15), scol, TEXT_ALIGN_CENTER, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) )
- DrawTextOutlined("Kills: "..v:GetNWInt( "Kills" ), "Trebuchet18", x + 405, (y + b - 1) + (k * 15), scol, TEXT_ALIGN_CENTER, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) )
- DrawTextOutlined("Deaths: "..v:Deaths(), "Trebuchet18", x + 475, (y + b - 1) + (k * 15), scol, TEXT_ALIGN_CENTER, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) )
- else --remove this line if you want this on another gamemode or change "sandbox" to the gamemode name
- DrawTextOutlined("Kills: "..v:GetNWInt( "Kills" ), "Trebuchet18", x + 405, (y + b - 1) + (k * 15), scol, TEXT_ALIGN_CENTER, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) ) --remove this line if you want this on another gamemode or change "sandbox" to the gamemode name
- DrawTextOutlined("Deaths: "..v:Deaths(), "Trebuchet18", x + 475, (y + b - 1) + (k * 15), scol, TEXT_ALIGN_CENTER, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) ) --remove this line if you want this on another gamemode or change "sandbox" to the gamemode name
- end --remove this line if you want this on another gamemode or change "sandbox" to the gamemode name
- end
- end
- end
- end
- hook.Add( "HUDDrawScoreBoard", "Draw", HUDDrawScoreBoard )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement