26.07.2009, 16:56
Hey, how could I make a class limit? For example, if there's more than 3 players in one team they can't select it and have to select another one.
Thanks.
Thanks.
// put this in the to of the script
new teamMembers[15];
// put this is OnGameModeInit
SetTimer("CheckTeams", 100, true);
// put this anywhere in the script
forward CheckTeams();
public CheckTeams()
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
teamMembers[gTeam[i]] += 1;
}
}
// then use this in your command
if(teamMembers[1] > 3) // the [1] is the team id
{
// bla bla bla...
}
Originally Posted by James_Alex(Coder)
try this
pawn Код:
|
Originally Posted by john11johng
on the blahh blahh blahh bit is that where u put code to disable class. If so what is it
|
Originally Posted by Mr_FinnigaN
Quote:
|