[HELP] How to get players' count?
#1

hi,

i want to get the count of all players in the server. I mean, if there are 52 players online, it will take "52" as count. How can i provide it?
Reply
#2

Quote:
Originally Posted by whitetigerswt
Посмотреть сообщение
Код:
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.
here.....
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)