GetPlayers
From Liberty Unleashed Wiki
This returns the number of players currently playing on the server.
Syntax
string GetPlayers()
Arguments
- None
Example
This command will return the number of players in the server when someone types /players'.
function OnPlayerCommand( id, cmd, text ) { if ( cmd == "players" ) { Message( "There are currently " + GetPlayers() + " players in-game.", id ); } }
Notes
The function MessagePlayer and call OnPlayerCommand were used in in this example. More info about them in corresponding pages.