GetPlayerCount: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 3: Line 3:


==Syntax==
==Syntax==
  getPlayerCount ( )
  Integer getPlayerCount ()


==Example==
==Example==
  playercount = '''getPlayerCount''' ();
  playercount = '''getPlayerCount''' ();
  serverChat ( "There are currently ", playercount, " players playing in the server" );
  serverChat ( "There are currently ", playercount, " players playing in the server" );

Revision as of 21:11, 24 March 2006

Description

This function returns the number of players currently connected to the server.

Syntax

Integer getPlayerCount ()

Example

playercount = getPlayerCount ();
serverChat ( "There are currently ", playercount, " players playing in the server" );