04.01.2015, 08:49
I believe you automatically attack it when there's 2+ players from the same team in another team's zone.
To set a players team, use:
Replace teamid with the teams in the topic.
Grove: 1
Ballas: 2
Vagos: 3
Example of it in a switch, making it spawn the player in a random team of the 3.
To set a players team, use:
pawn Код:
SetPlayerTeam(playerid, teamid);
Grove: 1
Ballas: 2
Vagos: 3
pawn Код:
public OnPlayerSpawn(playerid)
{
switch(random(3))
{
case 0: SetPlayerTeam(playerid, 1);
case 1: SetPlayerTeam(playerid, 2);
case 2: SetPlayerTeam(playerid, 3);
}
return 1;
}