14.01.2015, 14:29
Quote:
That's still wrong. It will list all jailed players and if the last slot isn't used it will also send the "no jailed" message. You need to keep a counter inside the loop which increments each time a jailed player is found. Then check if the counter is 0 when the loop is finished.
|
pawn Код:
new counter;
for(new x; x<MAX_PLAYERS; x++)
{
if(PlayerInfo[x][pjailed] == 1)
{
counter ++;
//list jailed players
}
if(x == MAX_PLAYERS -1 && !counter)
{
//no players in jail
}
}