26.01.2010, 07:24
This is why we have the -1
So at the beginning of the game, whoever spawns fisrt becomes sargent.
pawn Code:
public OnPlayerSpawn(playerid)
{
//Assuming team has already been chosen
if(sargeants[playerTeam[playerid]]==-1)
{
//Only get here if there is no sargeant yet
sargeants[playerTeam[playerid]]=playerid;
}
}