I will show you an of example of 2 teams
Police
&
Grove
Put this on top of your script, like above OnGameModeInit
pawn Код:
#define TEAM_POLICE 0
#define TEAM_GROVE 1
Put this also somewhere in above OnGameModeIniti
Now put this somewhere under your OnGameModeInit
pawn Код:
AddPlayerClass(107,2000.0933,1565.3741,15.3672,186.3705,24,150,0,0,0,0); // Grove
AddPlayerClass(283,2003.2732,1564.7144,15.3672,186.0572,24,150,0,0,0,0); // Cops
Now find OnPlayerRequestClass and put this under
pawn Код:
if (classid == 0)
{
gTeam[playerid] = TEAM_GROVE;
GameTextForPlayer(playerid,"~r~Grove",500,3);
}
else if (classid == 1)
{
gTeam[playerid] = TEAM_POLICE;
GameTextForPlayer(playerid,"~g~Police",500,3);
}
This is simply setting player's team by the skin they choose. If you have more questions, ask.
What is done here is that you define the both teams, and if player's skin is case 0, which is case GROVE, it means he'll be set to team Grove.
If he chooses the second skin, which is Case 1, he'll be set to team Police.