25.04.2011, 15:08
pawn Код:
new gTeam[MAX_PLAYERS];//Put this var As GLOBAL VAR
#define TEAM_ROBBERS 1
#define TEAM_COPS 2
public OnPlayerRequestClass(playerid,classid)
{
switch(classid)
{
case 98: gTeam[playerid] = TEAM_ROBBERS;
case 100: gTeam[playerid] = TEAM_ROBBERS;
case 101: gTeam[playerid] = TEAM_ROBBERS;
case 284: gTeam[playerid] = TEAM_COPS;
case 285: gTeam[playerid] = TEAM_COPS;
case 286: gTeam[playerid] = TEAM_COPS;
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(gTeam[playerid] == TEAM_ROBBERS)
{
SetPlayerColor(playerid,WHITE);
}
else if(gTeam[playerid] == TEAM_COPS)
{
SetPlayerColor(playerid,BLUE);
}
return 1;
}
try use switch
anyway i dont understand what u mean