What's worng?
#3

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;
}
the gTeam should be global

try use switch

anyway i dont understand what u mean
Reply


Messages In This Thread
What's worng? - by Cjgogo - 25.04.2011, 15:00
Re: What's worng? - by captainjohn - 25.04.2011, 15:06
Re: What's worng? - by iJumbo - 25.04.2011, 15:08
Re: What's worng? - by Cjgogo - 25.04.2011, 15:13
Re: What's worng? - by iJumbo - 25.04.2011, 15:14
Re: What's worng? - by Cjgogo - 25.04.2011, 15:34
Re: What's worng? - by iJumbo - 25.04.2011, 15:35
Re: What's worng? - by xir - 25.04.2011, 15:58
Re: What's worng? - by Cjgogo - 25.04.2011, 16:05
AW: Re: What's worng? - by xerox8521 - 25.04.2011, 18:54

Forum Jump:


Users browsing this thread: 1 Guest(s)