GetAllPlayers
Jump to navigation
Jump to search
GetAllPlayersServer-Side Function
![]() |
![]() |
---|
Gets all currently connected players in the server
Syntax
List<Client> NAPI.Pools.GetAllPlayers();
NOTE: This function returns data as a List of Client type.
Usage example(s)
Example Description
foreach (var player in NAPI.Pools.GetAllPlayers()) { player.SendChatMessage($"Hello, {player.Name}"); } // Or much simpler one-liner using Linq NAPI.Pools.GetAllPlayers().ForEach(player => player.SendChatMessage($"Hello, {player.Name}"));
Changelog
Version | Description |
---|---|
1.0 | Release. |