Код:
#define TEAM_CIV 0
#define TEAM_GROVE 1
#define TEAM_LSPD 2
#define TEAM_LSDFTF 3
#define TEAM_CIV_COLOR 0xFFFFFFFF //WHITE
#define TEAM_GROVE_COLOR 0x00FF00AA // GREEN
#define TEAM_LSPD_COLOR 0x033FFAA // BLUE
#define TEAM_LSDFTF_COLOR 0xFF3300FF//RED
new gTeam[MAX_PLAYERS];
//CUSTOM FUNCTIONS========================
SetPlayerTeamFromClass(playerid, classid)
{
if(classid == 0)
{
gTeam[playerid] = TEAM_CIV;
}
else if(classid == 1)
{
gTeam[playerid] = TEAM_GROVE;
}
else if(classid == 2)
{
gTeam[playerid] = TEAM_LSPD;
}
else if(classid == 3)
{
gTeam[playerid] = TEAM_LSDFTF;
}
}
SetPlayerToTeamColor(playerid)
{
if(gTeam[playerid] == TEAM_CIV)
{
SetPlayerColor(playerid, TEAM_CIV_COLOR);
}
else if(gTeam[playerid] == TEAM_GROVE)
{
SetPlayerColor(playerid, TEAM_GROVE_COLOR);
}
else if(gTeam[playerid] == TEAM_LSPD)
{
SetPlayerColor(playerid, TEAM_LSPD_COLOR);
}
else if(gTeam[playerid] == TEAM_LSDFTF)
{
SetPlayerColor(playerid, TEAM_LSDFTF_COLOR);
}
}
public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("AWALLS ROLEPLAY");
AddPlayerClass(136,1742.0367,-1949.9408,14.1172,269.7545,0,0,0,0,0,0); // CIV SPAWN
AddPlayerClass(13,1742.0367,-1949.9408,14.1172,269.7545,0,0,0,0,0,0); // CIV SPAWN
AddPlayerClass(36,1742.0367,-1949.9408,14.1172,269.7545,0,0,0,0,0,0); // CIV SPAWN
AddPlayerClass(16,1742.0367,-1949.9408,14.1172,269.7545,0,0,0,0,0,0); // CIV SPAWN
AddPlayerClass(107,2486.5901,-1646.3870,14.0703,173.8110,28,999,0,0,0,0); // Grove Spawn
AddPlayerClass(280,1568.6774,-1690.4060,5.8906,179.9383,24,999,0,0,0,0); // Police Spawn
AddPlayerClass(163,1654.1411,-1655.2291,22.5156,182.7242,0,0,0,0,0,0); // DEA SPAWN