Confusing SetPlayerTeam
#1

Код:
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);
}
This prints new team same as old team.

I replaced all SetPlayerTeam in my script...

Any idea why?
Reply


Messages In This Thread
Confusing SetPlayerTeam - by cmg4life - 18.02.2011, 15:46
Re: Confusing SetPlayerTeam - by Zh3r0 - 18.02.2011, 15:49
Re: Confusing SetPlayerTeam - by cmg4life - 18.02.2011, 15:51
Re: Confusing SetPlayerTeam - by Zh3r0 - 18.02.2011, 15:54
Re: Confusing SetPlayerTeam - by cmg4life - 18.02.2011, 16:02
Re: Confusing SetPlayerTeam - by Zh3r0 - 18.02.2011, 16:11

Forum Jump:


Users browsing this thread: 1 Guest(s)