Added the new core as a subtree.
This commit is contained in:
14
Core/playerlist.lua
Normal file
14
Core/playerlist.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
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
|
||||
Reference in New Issue
Block a user