GANG COLOR
#1

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.....
Reply
#2

H.E.L.P
Reply
#3

C'mon someone, help.
Reply
#4

H_E_L_P
Reply
#5

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
Reply
#6

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)...
Reply
#7

Hmm Can you show me The defines ?
Reply
#8

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
Reply
#9

Hmm...
Reply
#10

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



Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)