#include < a_samp>
static gTeam[MAX_PLAYERS];
#define TEAM_1 (0)
#define TEAM_2 (1)
new Counter[ 2 ] = 0;
public OnPlayerSpawn( playerid )
{
if( gTeam[ playerid ] == TEAM_1 )
{
++Counter[ 0 ];
}
else
{
++Counter[ 1 ];
}
if( Counter[ 0 ] - Counter[ 1 ] > 1 )
{
gTeam[ playerid ] = TEAM_2;
--Counter[ 0 ];
++Counter[ 1 ];
}
return 1;
}