18.02.2011, 16:11
Ahh, i understand now. It was confusing, you should have explained from the start!
Then how about doing some checks with printf?
Maybe the code stops somewhere. I know it may sound strange but this way i solved many of my problems that were just..unexplainable.
Then how about doing some checks with printf?
Maybe the code stops somewhere. I know it may sound strange but this way i solved many of my problems that were just..unexplainable.
pawn Код:
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);
}