blob: 73d9e5b24a80eb7f35e960e12b132a3d52da41fb (
plain) (
tree)
|
|
function HandlePlayerListCommand( Split, Player )
local PlayerTable = {}
local AppendToTable = function( Player )
table.insert(PlayerTable, Player:GetName() )
end
Player:GetWorld():ForEachPlayer( AppendToTable )
local Message = cChatColor.Green .. "Connected players: (".. cChatColor.White.. #PlayerTable .. cChatColor.Green .. ")"
Player:SendMessage( Message )
Player:SendMessage( table.concat(PlayerTable, " ") )
return true
end
|