Advertisement
my_hat_stinks

Untitled

Feb 28th, 2014
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.89 KB | None | 0 0
  1.  
  2. hook.Add( "TTTScoreboardColumns", "Scoreboard Columns Test", function( pnl, typ )
  3.    pnl:AddColumn( "CurTime", function() return math.floor(CurTime()) end )
  4.    local label = pnl:AddColumn( "Rank", function(ply,pnl) return ply:GetUserGroup() end)
  5.    
  6.    label.Think = function( s )
  7.       local col = s.IsHeading and Color(255,0,0) or Color( 0,0,255 ) --Red in heading, Blue in row
  8.       s:SetTextColor( col )
  9.    end
  10. end)
  11.  
  12. hook.Add( "TTTScoreboardMenu", "Scoreboard Menu Test", function( menu )
  13.    local sub = menu:AddSubMenu( "Player stuff" )
  14.    sub:AddOption( "Copy SteamID", function()
  15.       if IsValid(menu) and IsValid( menu.Player ) then
  16.          SetClipboardText( menu.Player:SteamID() ) chat.AddText( "SteamID copied to clipboard!" )
  17.       end
  18.    end)
  19. end)
  20.  
  21. hook.Add( "TTTScoreboardMenu", "Scoreboard Block Menu", function( menu )
  22.    return true --No menus, we hate them >:c
  23. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement