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