would it be more proffesional to replace MAX_PLAYERS?
#9

Quote:
Originally Posted by /^We(stie|z+[e|a
r)$/ ]
Quote:
Originally Posted by dice7
pawn Код:
for (new i = 0; i < GetMaxPlayers ; i++)
https://sampwiki.blast.hk/wiki/GetMaxPlayers
So you want to call that function time and time again? Not exactly efficient, is it?
GetMaxPlayers

Returns the maximum number of players that can play on your server. You can not use predefined MAX_PLAYERS instead of this function, as MAX_PLAYERS defaults to 200. GetMaxPlayers is in contrast read from the server.cfg

that's what the wiki says there i dunno what u mean
it just get's ur maximum players that u can have on you server.

tho u could make a variable like.

pawn Код:
new players;

OnPlayerConnect(playerid)
{
players ++;
return 1;
}

OnPlayerDisconnect(playerid,reason)
{
players --;
return 1;
}
and then simply

for (new i = 0; i < players ; i++)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)