29.06.2012, 21:33
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).
Then you can do:
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
}
pawn Код:
forward StartCD();
public StartCD()
{
for(new i; i != MAX_PLAYERS; i++)
{
if(count[i]) continue;
// Rest of BaubaS' code
}
}