Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2011
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.12 KB | None | 0 0
  1. function ScoreboardShow()
  2.     GAMEMODE.ShowScoreboard = true
  3.     gui.EnableScreenClicker( true )
  4.     return true
  5. end
  6. hook.Add( "ScoreboardShow", "Show", ScoreboardShow )
  7.  
  8. function ScoreboardHide()
  9.     GAMEMODE.ShowScoreboard = false
  10. end
  11. hook.Add( "ScoreboardHide", "Hide", ScoreboardHide )
  12.  
  13. bcol = Color( 100, 125, 255, 225 )
  14. scol = Color( 255, 255, 100, 255 )
  15. x = 15
  16. y = 150
  17. w = 60
  18. h = 20
  19. b = 5
  20.  
  21. local Selected = "General"
  22.  
  23. function HUDDrawScoreBoard()
  24. if not GAMEMODE.ShowScoreboard then return true end
  25.  
  26.     draw.RoundedBox( 0, x + 65 - b, y - b, w + 335 + (65*2), 20, jc_color_bg )
  27.         for i = 1, 3 do
  28.             local Tabs = {
  29.                 "General",
  30.                 "Status",
  31.                 "All",
  32.             }
  33.  
  34.             draw.RoundedBox( 0, x + (65 * i), y, w, 15, bcol )
  35.            
  36.             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 ) )
  37.  
  38.             if Selected == Tabs[i] then
  39.                 surface.SetDrawColor( 255, 255, 255, 125 )
  40.                 surface.SetTexture(surface.GetTextureID("gui/gradient_down"))
  41.                 surface.DrawTexturedRect(x + (65 * i), y, w, 15)
  42.             end
  43.            
  44.             if CursorPos( x + (65 * i), y, w, 15 ) then
  45.                 draw.RoundedBox( 0, x + (65 * i), y, w, 15, Color( 255, 255, 255, 60 ) )
  46.                 if input.MousePress( MOUSE_LEFT ) then
  47.                     Selected = Tabs[i]
  48.                 end
  49.             end
  50.            
  51.            
  52.         for k,v in pairs( player.GetAll() ) do
  53.        
  54.             if CursorPos( x + 63, y + 5 + (k * 15), w + 327 + (65*2), 16 ) then
  55.                 draw.RoundedBox( 0, x + 64, y + 6 + (k * 15), w + 325 + (65*2), 15, Color( 255, 255, 255, 25 ) )           
  56.             end
  57.            
  58.            
  59.             props = (
  60.                 v:GetCount( "props" ) +
  61.                 v:GetCount( "ragdolls" ) +
  62.                 v:GetCount( "effects" ) +
  63.                 v:GetCount( "vehicles" ) +
  64.                 v:GetCount( "npcs" ) +
  65.                 v:GetCount( "hoverballs" ) +
  66.                 v:GetCount( "thrusters" ) +
  67.                 v:GetCount( "balloons" ) +
  68.                 v:GetCount( "buttons" ) +
  69.                 v:GetCount( "dynamite" ) +
  70.                 v:GetCount( "sents" ) +
  71.                 v:GetCount( "lights" ) +
  72.                 v:GetCount( "lamps" )
  73.             )
  74.            
  75.            
  76.             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 ) )
  77.            
  78.             if Selected == "General" then
  79.            
  80.                 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 ) )
  81.                 if gamemode.Get( "sandbox" ) then
  82.                     DrawTextOutlined("Props: "..props, "Trebuchet18", x + 485, (y + b - 1) + (k * 15), scol, TEXT_ALIGN_CENTER, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) )
  83.                 end
  84.                
  85.             elseif Selected == "Status" then
  86.            
  87.                 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 ) )
  88.                 if v:IsAdmin() then
  89.                     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 ) )
  90.                 else
  91.                     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 ) )
  92.                 end
  93.                
  94.             elseif Selected == "All" then
  95.                
  96.                 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 ) )
  97.                
  98.                 if v:IsAdmin() then
  99.                     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 ) )
  100.                 else
  101.                     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 ) )
  102.                 end
  103.                
  104.                 if gamemode.Get( "sandbox" ) then --remove this line if you want this on another gamemode or change "sandbox" to the gamemode name
  105.                     DrawTextOutlined("Props: "..props, "Trebuchet18", x + 335, (y + b - 1) + (k * 15), scol, TEXT_ALIGN_CENTER, TEXT_ALIGN_LEFT, 1, Color( 5, 5, 5, 255 ) )
  106.                     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 ) )
  107.                     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 ) )
  108.                 else --remove this line if you want this on another gamemode or change "sandbox" to the gamemode name
  109.                     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
  110.                     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
  111.                 end --remove this line if you want this on another gamemode or change "sandbox" to the gamemode name
  112.  
  113.             end
  114.         end
  115.     end
  116. end
  117. hook.Add( "HUDDrawScoreBoard", "Draw", HUDDrawScoreBoard )
  118.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement