04.05.2011, 10:14
I've got 6 AddPlayerClass'es, and two teams with their own colors, but colors are not given to AddPlayerClass corectly on spawn.
How may I fix it?
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 1 && 2 && 3)
{
gTeam[playerid] = TEAM_POLICE;
}
if(classid == 4 && 5 && 6)
{
gTeam[playerid] = TEAM_MAFIA;
}
}
pawn Код:
SetPlayerToTeamColor(playerid)
{
if (gTeam[playerid] == TEAM_POLICE)
{
SetPlayerColor(playerid, COLOR_AQUA);
}
else if (gTeam[playerid] == TEAM_MAFIA)
{
SetPlayerColor(playerid, COLOR_BROWN);
}
}