21.07.2013, 15:55
Hi everyone,
I have a problem, I wanted to limit the players of team MERC and NINJA on my server.
To achieve that, I've put a counter, to count the number of MERCS and NINJAS.
However, in the callback "OnPlayerDisconnect", I don't want the counter to decrease when the player is choosing a class...
Here's my code :
I have a problem, I wanted to limit the players of team MERC and NINJA on my server.
To achieve that, I've put a counter, to count the number of MERCS and NINJAS.
However, in the callback "OnPlayerDisconnect", I don't want the counter to decrease when the player is choosing a class...
Here's my code :
Код:
public OnPlayerDisconnect(playerid, reason)
{
if(gTeam[playerid] == MERC) {
MERC_COUNT--;
printf("Il y a %d mercenaire (disconnect)",MERC_COUNT);
}
else if(gTeam[playerid] == NINJA) {
NINJA_COUNT--;
printf("Il y a %d ninja (disconnect)",NINJA_COUNT);
}
else{
printf("Disconnected without choosing class");
}
}

