28.11.2011, 09:38
Quote:
Why the hell do you need such a complicated code for this... it can be done with just 3 lines.
pawn Код:
|
pawn Код:
#define for2(MAX_PLAYERS,%1) for(new %1=0;%1<MAX_PLAYERS;%1++) if(IsPlayerConnected(%1))
new
str[156],
counter
;
for2(MAX_PLAYERS,i) counter++;
if(counter <= 2) return SendClientMessage(playerid, -1, "There are currently no players in the server!");
format(str, sizeof(str), "There is current %d players online in the server", counter-1);
SendClientMessage(playerid,-1, str);