19.02.2010, 17:13
Ok, thanks SAWC.
Another noob question. I want each gang (Grove, Balla, Triad, Vagos) to have their own gang color. (Both blips AND name in chat screen).
I have it like this..
Then, down some..
And, under OnPlayerSpawn, i run my function. I cant see why it wouldnt work..
Another noob question. I want each gang (Grove, Balla, Triad, Vagos) to have their own gang color. (Both blips AND name in chat screen).
I have it like this..
Код:
#define TeamGrovest 1 #define TeamBallas 2 #define TeamVagos 3 #define TeamTriads 4 #define TeamGrovestColor 0x339900AA #define TeamBallasColor 0xAF00FFAA #define TeamVagosColor 0xBF00FFAA #define TeamTriadsColor 0xCF00FFAA //these are just random colors for testing. I'll change them later.
Код:
SetPlayerTeamFromClass(playerid, classid)
{
{
if(classid == 105 || classid == 106 || classid == 107)
gTeam[playerid] = TeamGrovest;
}
{
if(classid == 102 || classid == 103 || classid == 104)
gTeam[playerid] = TeamBallas;
}
{
if(classid == 108 || classid == 109 || classid == 110)
gTeam[playerid] = TeamVagos;
}
{
if(classid == 117 || classid == 118 || classid == 120)
gTeam[playerid] = TeamTriads;
}
}
SetPlayerToTeamColor(playerid)
{
if (gTeam[playerid] == TeamGrovest)
{
SetPlayerColor(playerid, TeamGrovestColor);
}
else if (gTeam[playerid] == TeamBallas)
{
SetPlayerColor(playerid, TeamBallasColor);
}
else if (gTeam[playerid] == TeamVagos)
{
SetPlayerColor(playerid, TeamVagosColor);
}
else if (gTeam[playerid] == TeamTriads)
{
SetPlayerColor(playerid, TeamTriadsColor);
}
}
And, under OnPlayerSpawn, i run my function. I cant see why it wouldnt work..

