Little help
#4

I have a small tip about making that loop, which would eliminate the need for an IsPlayerConnected function call.

Make sure that the count variable is 1 for all disconnected players (weird that you use 1 for not displaying and 0 for displaying, though).
pawn Код:
new count[MAX_PLAYERS] = {1, ...};
// ...
public OnPlayerDisconnect(playerid)
{
    count[playerid] = 1; // Counting disabled
}
Then you can do:
pawn Код:
forward StartCD();
public StartCD()
{
    for(new i; i != MAX_PLAYERS; i++)
    {
        if(count[i]) continue;
        // Rest of BaubaS' code
    }
}
Reply


Messages In This Thread
Little help - by ixesas - 29.06.2012, 21:18
Re: Little help - by [A]ndrei - 29.06.2012, 21:22
Re: Little help - by BaubaS - 29.06.2012, 21:29
Re: Little help - by AndreT - 29.06.2012, 21:33

Forum Jump:


Users browsing this thread: 2 Guest(s)