2012-01-26 17:44:37 -05:00
|
|
|
function HandlePlayerListCommand( Split, Player )
|
2012-02-15 08:16:42 -05:00
|
|
|
|
|
|
|
local PlayerTable = {}
|
|
|
|
local AppendToTable = function( Player )
|
|
|
|
table.insert(PlayerTable, Player:GetName() )
|
|
|
|
end
|
2012-02-14 14:14:23 -05:00
|
|
|
Player:GetWorld():ForEachPlayer( AppendToTable )
|
2012-01-26 17:44:37 -05:00
|
|
|
|
2012-02-14 14:14:23 -05:00
|
|
|
local Message = cChatColor.Green .. "Connected players: (".. cChatColor.White.. #PlayerTable .. cChatColor.Green .. ")"
|
2012-01-26 17:44:37 -05:00
|
|
|
Player:SendMessage( Message )
|
2012-02-14 14:14:23 -05:00
|
|
|
|
2012-01-26 17:44:37 -05:00
|
|
|
Player:SendMessage( table.concat(PlayerTable, " ") )
|
|
|
|
return true
|
|
|
|
end
|