Auto teams
#1

Hi,
Can anyone help me create a code when players connect they auto set to the team with the less players?
Reply
#2

use random
Reply
#3

Oh yeah thanks
Reply
#4

Now i have:
pawn Код:
new Float:Team[][2] =
{
    {1},
    {2}
};

public OnFilterScriptInit()
{
    SetTeamCount( 2 );
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    new rand = random(sizeof(Team));
    SetSpawnInfo(playerid, 0, 277, 2500.0, 1500.0, 10.5, 90.0, 26, 250, 28, 250, 0, 0);
    SpawnPlayer(playerid);
    SetPlayerTeam(playerid, Team[rand][0]);
    return 1;
}
(8 ) : warning 213: tag mismatch
(9 ) : warning 213: tag mismatch
(29 ) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
Reply
#5

nevermind fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)