stock xSetPlayerTeam(id, team) { #if TESTING printf("ID:%i, Name:%s, Old Team: %i, New Team: %i", id, idName[id], GetPlayerTeam(id), team); #endif if( team != GetPlayerTeam(id) ) { switch(team) { case TEAM_USA:UPlayers++; case TEAM_EUR:EPlayers++; case TEAM_ARAB:ABPlayers++; case TEAM_AUS:ASPlayers++; case TEAM_SOV:SPlayers++; case TEAM_LAT:LPlayers++; case TEAM_TERR:TPlayers++; case TEAM_ASIA:APlayers++; } if(team == (id+10)) FPlayers++; switch(GetPlayerTeam(id)) { case TEAM_USA:UPlayers--; case TEAM_EUR:EPlayers--; case TEAM_ARAB:ABPlayers--; case TEAM_AUS:ASPlayers--; case TEAM_SOV:SPlayers--; case TEAM_LAT:LPlayers--; case TEAM_TERR:TPlayers--; case TEAM_ASIA:APlayers--; } if(GetPlayerTeam(id) == (id+10)) FPlayers--; } return SetPlayerTeam(id, team); }
I tried replacing GetPlayerTeam with a PVar i set each time, team changes. But i got the same effect.
|
stock xSetPlayerTeam(id, team)
{
#if TESTING
printf("ID:%i, Name:%s, Old Team: %i, New Team: %i", id, idName[id], GetPlayerTeam(id), team);
#endif
if( team != GetPlayerTeam(id) )
{
print("after team != ... ");
switch(team)
{
case TEAM_USA:UPlayers++;
case TEAM_EUR:EPlayers++;
case TEAM_ARAB:ABPlayers++;
case TEAM_AUS:ASPlayers++;
case TEAM_SOV:SPlayers++;
case TEAM_LAT:LPlayers++;
case TEAM_TERR:TPlayers++;
case TEAM_ASIA:APlayers++;
}
if(team == (id+10)) FPlayers++;print("if(team ++");
switch(GetPlayerTeam(id))
{
case TEAM_USA:UPlayers--;
case TEAM_EUR:EPlayers--;
case TEAM_ARAB:ABPlayers--;
case TEAM_AUS:ASPlayers--;
case TEAM_SOV:SPlayers--;
case TEAM_LAT:LPlayers--;
case TEAM_TERR:TPlayers--;
case TEAM_ASIA:APlayers--;
}
if(GetPlayerTeam(id) == (id+10)) FPlayers--;print("if(GetPlayerTeam --");
switch(team)
{
case TEAM_USA..TEAM_ASIA:printf("Team Changed for team %d",team);
}
print("after switches");
}
return SetPlayerTeam(id, team);
}