MAX_SLOTS or MAX_PLAYERS
#9

Quote:
Originally Posted by iggy1
Посмотреть сообщение
To get max players from server.cfg i beleive its this, (slower than MAX_PLAYERS though)
pawn Код:
for(new i; i < GetMaxPlayers(); i++)
You could also do this for loops:

pawn Код:
//Global variable
new TOTAL_PLAYERS;

//OnGameModeInit:
TOTAL_PLAYERS = GetMaxPlayers();

//Loop:
for(new i; i < TOTAL_PLAYERS; i++)
Should be faster than calling GetMaxPlayers() every time.

However, I would recommend simply using foreach include.
Reply


Messages In This Thread
MAX_SLOTS or MAX_PLAYERS - by Celson - 02.12.2010, 04:15
Re: MAX_SLOTS or MAX_PLAYERS - by MrDeath537 - 02.12.2010, 04:18
Re: MAX_SLOTS or MAX_PLAYERS - by Celson - 02.12.2010, 04:19
Re: MAX_SLOTS or MAX_PLAYERS - by Steven82 - 02.12.2010, 04:22
Re: MAX_SLOTS or MAX_PLAYERS - by MrDeath537 - 02.12.2010, 04:26
Re: MAX_SLOTS or MAX_PLAYERS - by Celson - 02.12.2010, 04:28
Re: MAX_SLOTS or MAX_PLAYERS - by Steven82 - 02.12.2010, 04:41
Re: MAX_SLOTS or MAX_PLAYERS - by iggy1 - 02.12.2010, 08:29
Re: MAX_SLOTS or MAX_PLAYERS - by TheXIII - 02.12.2010, 10:12
Re: MAX_SLOTS or MAX_PLAYERS - by LarzI - 02.12.2010, 10:40

Forum Jump:


Users browsing this thread: 2 Guest(s)