diff options
Diffstat (limited to '')
-rw-r--r-- | Plugins/Core/playerlist.lua | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Plugins/Core/playerlist.lua b/Plugins/Core/playerlist.lua index 63990e825..f06dfed85 100644 --- a/Plugins/Core/playerlist.lua +++ b/Plugins/Core/playerlist.lua @@ -1,7 +1,9 @@ -local PlayerTable = {}
-
function HandlePlayerListCommand( Split, Player )
- PlayerTable = {}
+
+ 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 .. ")"
@@ -9,8 +11,4 @@ function HandlePlayerListCommand( Split, Player ) Player:SendMessage( table.concat(PlayerTable, " ") )
return true
-end
-
-function AppendToTable( Player )
- table.insert(PlayerTable, Player:GetName() )
end
\ No newline at end of file |