28.11.2011, 08:23
Hey now synic reply on my problem in counting players in the server (not include yourself)
now i have problem i want not to include myself in counting but it keeps including me in counting
heres the code:
Please help me
now i have problem i want not to include myself in counting but it keeps including me in counting
heres the code:
pawn Код:
#define for2(%0,%1) for(new %1=0;%1<MAX_PLAYERS;%1++) if(IsPlayerConnected(%1))
pawn Код:
new
str[156],
counter
;
for2(MAX_PLAYERS,i)
counter++;
format(str, sizeof(str), "There is current %d players online in the server", counter);
SendClientMessage(playerid,COLOR_WHITE, str);
if(counter != playerid)
{
counter--;
return 1;
}
if(counter == 0)
{
SendClientMessage(playerid,COLOR_RED,"There is current no players online in the server");
return 1;
}