[R]How to get online players count
#1

Hi
how to get online player count

Ex:

500/150 Player online.
Reply
#2

Code:
GetPlayersOnServer() {
	new count;
	for(new x=0; x< MAX_PLAYERS; x++) { //x = MAX_PLAYERS
	  if(IsPlayerConnected(x))) { 
			count++;
		}
	}
	return count;
}
Then call that function whenever you need to know how many players are on the server.
Reply
#3

thanks a lot
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)