Got a question that the wiki doesn't answer? Ask on the forum (preferred), or join us on IRC.


CommandHelper/API/all players

From Wiki
Jump to: navigation, search

All Players

Description: Returns an array of all the player names of all the online players on the server

Format: all_players()

Returns: array of all the players currently on the server


# displays how many people are currently on the server
run( /say length(all_players() ))

# gives one stone to all players
foreach(all_players(),@pl, run( /give @pl 1 1 ))

Navigation menu