pawn Код:
new spawn[74];
new PlayerVar = playerid;
if(PlayerInfo[playerid][pTeam] == 1)
{
for(new i; i< 37; i++)
{
if(!spawn[i])
{
spawn[i] = PlayerVar;
break;
}
}
}
else if(PlayerInfo[playerid][pTeam] == 2)
{
SetPlayerTeam(playerid, TEAM_GROVE);
for(new j=37; j< 74; j++)
{
if(!spawn[j])
{
spawn[j] = PlayerVar;
break;
}
}
}
And finally put all your coords for spawn in an array like the one some posts above, and do:
pawn Код:
SetPlayerPos(spawn[playerid],array[spawn[playerid]][0],array[spawn[playerid]][1],array[spawn[playerid]][2]);