04.09.2010, 21:24
1. Try something like this:
2. Use GetPlayerScore:
These are just examples, play around with it
pawn Код:
//global var
new gTeamCount[ MAX_TEAMS ]; //change MAX_TEAMS with the number of teams you got
pawn Код:
//when a player joins a team
if( gTeamCount[ ID_OF_TEAM ] == 10 ) //change ID_OF_TEAM with the actual ID of the team
{
SendClientMessage( playerid, 0xFF0000FF, "There are already max players in this team, chose another one!" );
//do whatever you want
}
gTeamCount[ ID_OF_TEAM ]++;
pawn Код:
//when a player tries to join SWAT team
if( GetPlayerScore( playerid ) < 2000 )
return SendClientMessage( playerid, 0xFF0000FF, "This team requires 2000 score!" );