where do i find the colours of the teams? -
samtey - 19.07.2011
Hi,
I got a question! Where do I find the colours of the teams? For example:
Код:
#define TEAM_BALLA_COLOR 0xFF00FFAA // Bright Purple
And when I defined them, I should add them here?
Код:
SetPlayerTeamFromClass(playerid, classid)
{
if (classid == 0)
{
gTeam[playerid] = TEAM_GROVE;
}
else
{
gTeam[playerid] = TEAM_BALLA;
}
}
But when there are more teams, like Vagos and Police, how should I add them in this if-else thing??
Re: where do i find the colours of the teams? -
Wesley221 - 19.07.2011
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
switch(classid)
{
case 0 .. 2: gTeam[playerid] = TEAM_GROVE; // Case 0, 1, 2 are TEAM_GROVE
case 3 .. 5: gTeam[playerid] = TEAM_BALLA; // Case 3, 4, 5 are TEAM_BALLA
case 6 .. 8: gTeam[playerid] = TEAM_VAGOS; // Case 6, 7, 8 are TEAM_VAGOS
case 9: gTeam[playerid] = TEAM_CJ; // Case 9 is TEAM_CJ
}
}
Change the teams you use, and the classid's aswell
Edit:
pawn Код:
SetPlayerToTeamColour(playerid)
{
if(gTeam[playerid] == TEAM_GROVE)
{
SetPlayerColor(playerid, color here);
}
else if (gTeam[playerid] == TEAM_BALLA)
{
SetPlayerColor(playerid, color here);
}
else if (gTeam[playerid] == TEAM_VAGOS)
{
SetPlayerColor(playerid, color here);
}
else if (gTeam[playerid] == TEAM_CJ)
{
SetPlayerColor(playerid, color here);
}
}
AW: where do i find the colours of the teams? -
samtey - 19.07.2011
Ok, thank u^^
Only one question left: Where do I find the colours of the teams? I told above ur post, which colours I mean!
AW: where do i find the colours of the teams? -
samtey - 19.07.2011
Oh, and something else:
Which of ur Codes above should I take
?
Re: where do i find the colours of the teams? -
Lorenc_ - 19.07.2011
RR GG BB
Red Green Blue
Thats the HEX format, forgot the other format to the code
0x FF FF FF FF
RR GG BB Transparency ( Think so )
Theres many programs for this as well.
Re: where do i find the colours of the teams? -
Wesley221 - 19.07.2011
https://sampforum.blast.hk/showthread.php?tid=157789
+ what Lorenc said, there are some progams for this aswell: ****** around
AW: where do i find the colours of the teams? -
samtey - 19.07.2011
Thanks! Only, which of ur Codes above should I take, Wesley?
Re: where do i find the colours of the teams? -
Wesley221 - 19.07.2011
This one will set the team from class. I missreaded your question in the first place, so i made the second one
pawn Код:
SetPlayerTeamFromClass(playerid, classid)
{
switch(classid)
{
case 0 .. 2: gTeam[playerid] = TEAM_GROVE; // Case 0, 1, 2 are TEAM_GROVE
case 3 .. 5: gTeam[playerid] = TEAM_BALLA; // Case 3, 4, 5 are TEAM_BALLA
case 6 .. 8: gTeam[playerid] = TEAM_VAGOS; // Case 6, 7, 8 are TEAM_VAGOS
case 9: gTeam[playerid] = TEAM_CJ; // Case 9 is TEAM_CJ
}
}
This one changes your colour
pawn Код:
SetPlayerToTeamColour(playerid)
{
if(gTeam[playerid] == TEAM_GROVE)
{
SetPlayerColor(playerid, color here);
}
else if (gTeam[playerid] == TEAM_BALLA)
{
SetPlayerColor(playerid, color here);
}
else if (gTeam[playerid] == TEAM_VAGOS)
{
SetPlayerColor(playerid, color here);
}
else if (gTeam[playerid] == TEAM_CJ)
{
SetPlayerColor(playerid, color here);
}
}
AW: where do i find the colours of the teams? -
samtey - 19.07.2011
@Wesley
So I should take both, one time for "SetPlayerTeamFromClass" and the other one for "SetPlayerToTeamColor"!
Re: where do i find the colours of the teams? -
Wesley221 - 19.07.2011
Well, its what you want.
You can use your own "SetPlayerTeamFromClass", or just use mines. Just use what you want
AW: where do i find the colours of the teams? -
samtey - 19.07.2011
But u wrote SetPlayerToTeamColour!
This doesn't exist in my gamemode, where should I add it, if I want to take this?
Re: where do i find the colours of the teams? -
Wesley221 - 19.07.2011
Just like how u did SetPlayerTeamFromClass