Team limit problem
#1

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 :


Код:
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");
}

}
Reply


Messages In This Thread
Team limit problem - by kurt225 - 21.07.2013, 15:55
Re: Team limit problem - by arakuta - 21.07.2013, 16:11
Re: Team limit problem - by kurt225 - 21.07.2013, 16:21

Forum Jump:


Users browsing this thread: 2 Guest(s)