20.04.2013, 16:54
pawn Код:
GetPlayersOnServer()
{
new count;
for(new x=0; x< MAX_PLAYERS; x++)
{
if(IsPlayerConnected(x))
{
count++;
}
}
return count;
}
count = count+1 (count++), but count doesn't have any value, it contains junk.
Just assign a value to count while defining it:
pawn Код:
new count = 0;