Player.GetAll
Skip to content
mnscript
Player[] Player.GetAll() 

Description ​

Returns an array of all online Players

Returns ​

Player[] - The array of Players

Example ​

msc
using Player;
using Console;
using Array;

// Finds all the players, and prints all their names.

Player[] plys = Player.GetAll();
number numPlys = Array.Length(plys);

number i = 0;
while(i < numPlys){
    i = i + 1;

    Player ply = plys[i];
    Console.WriteLine("Player: "..ply.GetName());
}