- Team limit
#1

How do i make a litmit for a team? Like: 2 teams, every team can only have 15 players, and if 16th player try to enter the team, receive a message saying that the team is full.

Help?
Reply
#2

Make a variable and store the amount of people that are in the team in the variable. Then simply do a check when someone wants to enter a team and send the message if its full.

pawn Код:
new TeamCount = 0;

//When person enters team
TeamCount++;

//When persons leaves team
TeamCount--;

//Then to see if its full
if(TeamCount >= 15)
{
   SendClientMessage(playerid,red,"Team is full!");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)