25.08.2010, 03:16
OK here is the code ask if you need something else
P.S : cops and swat have different colors on radar
pawn Код:
#define TEAM_Cop 1
#define TEAM_Mafia 2
#define TEAM_Swat 3
static gTeam[MAX_PLAYERS];
forward SetPlayerToTeamColor(playerid);
Code:
public OnPlayerSpawn(playerid)
{
SetPlayerToTeamColor(playerid);
SetPlayerInterior(playerid,0);
if(gTeam[playerid] == TEAM_Cop)
{
SetPlayerTeam(playerid,1);
}
else if(gTeam[playerid] == TEAM_Swat)
{
SetPlayerTeam(playerid,1);
}
else if(gTeam[playerid] == TEAM_Mafia)
{
SetPlayerTeam(playerid, 2);
}
return 1;
}