SA-MP Forums Archive
GANG COLOR - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: GANG COLOR (/showthread.php?tid=71519)



GANG COLOR - Frankox - 01.04.2009

public OnPlayerRequestSpawn(playerid)
{
if (gTeam[playerid] == TEAM_ARMY)
{
SetPlayerColor(playerid, TEAM_ARMY_COLOR);
}

else if (gTeam[playerid] == TEAM_GROVE)
{
SetPlayerColor(playerid,TEAM_GROVE_COLOR);
}
else if (gTeam[playerid] == TEAM_BALLAS)
{
SetPlayerColor(playerid, TEAM_BALLAS_COLOR);
}
else if (gTeam[playerid] == TEAM_VAGOS)
{
SetPlayerColor(playerid, TEAM_VAGOS_COLOR);
}

return 1;
}

public SetPlayerToTeamColor(playerid)
{
if (gTeam[playerid] == TEAM_ARMY)
{
SetPlayerColor(playerid, TEAM_ARMY_COLOR);
}
else if (gTeam[playerid] == TEAM_GROVE)
{
SetPlayerColor(playerid,TEAM_GROVE_COLOR);
}
else if (gTeam[playerid] == TEAM_BALLAS)
{
SetPlayerColor(playerid, TEAM_BALLAS_COLOR);
}
else if (gTeam[playerid] == TEAM_VAGOS)
{
SetPlayerColor(playerid, TEAM_VAGOS_COLOR);
}
return 1;
}

public SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 0 || classid == 1 || classid == 2 )
{
gTeam[playerid] = TEAM_GROVE;
}
else if (classid == 3 || classid == 4 || classid == 5 )

{
gTeam[playerid] = TEAM_BALLAS;
}
else if (classid == 6 || classid == 7 || classid == 8 )

{
gTeam[playerid] = TEAM_VAGOS;
}
else if (classid == 9 || classid == 10 )

{
gTeam[playerid] = TEAM_ARMY;
}
return 1;
}



It doesnt show any error, but color is every time RED,(it is suposded to be army color), and i want every gang to have color for itself.....


Re: GANG COLOR - Frankox - 01.04.2009

H.E.L.P


Re: GANG COLOR - Frankox - 01.04.2009

C'mon someone, help.


Re: GANG COLOR - Frankox - 02.04.2009

H_E_L_P


Re: GANG COLOR - basker - 02.04.2009

Ermm ? Did you define The gang Colors ?
like
Код:
#define TEAM_COLOR_GROVE COLOR_GREEN
Other way look at Wiki Sometimes It can Relly Help you out readin ?
https://sampwiki.blast.hk/wiki/PAWN_tuto...eam_deathmatch


Re: GANG COLOR - Frankox - 02.04.2009

Quote:
Originally Posted by basker
Ermm ? Did you define The gang Colors ?
like
Код:
#define TEAM_COLOR_GROVE COLOR_GREEN
Other way look at Wiki Sometimes It can Relly Help you out readin ?
https://sampwiki.blast.hk/wiki/PAWN_tuto...eam_deathmatch
The problem is when i go ingame i have just the color of gang what is on the top of the script(in this case its army)...


Re: GANG COLOR - basker - 02.04.2009

Hmm Can you show me The defines ?


Re: GANG COLOR - Frankox - 02.04.2009

Quote:
Originally Posted by basker
Hmm Can you show me The defines ?
#define TEAM_ARMY_COLOR 0xAA3333AA // Army color
#define TEAM_GROVE_COLOR 0x33AA33AA // Bright Green (in RGBA format)
#define TEAM_BALLAS_COLOR 0xC2A2DAAA // Bright Purple
#define TEAM_VAGOS_COLOR 0xFFFF00AA // Yellow


Re: GANG COLOR - Frankox - 02.04.2009

Hmm...


Re: GANG COLOR - basker - 02.04.2009

Quote:

#define TEAM_ARMY_COLOR 0xAA3333AA // Army color
#define TEAM_GROVE_COLOR 0x33AA33AA // Bright Green (in RGBA format)
#define TEAM_BALLAS_COLOR 0xC2A2DAAA // Bright Purple
#define TEAM_VAGOS_COLOR 0xFFFF00AA // Yellow

Try use this :P

Код:
#define TEAM_ARMY_COLOR	 0xAA3333AA // Army color
#define TEAM_GROVE_COLOR	0x33AA33AA // Bright Green (in RGBA format)
#define TEAM_BALLAS_COLOR	0x7D26CDAA // Bright Purple
#define TEAM_VAGOS_COLOR	0x#EEEE00AA // Yellow
Other way Did you remaber to add


Код:
SetPlayerTeamFromClass(playerid, classid);
Under OnPlayerRequestClass ?

And
Код:
SetPlayerToTeamColor(playerid)
Under OnPlayerSpawn