for(new i = 0;i < MAX_PLAYERS;i++)
{
if(gTeam[playerid] == TEAM_RUS && gTeam[i] == TEAM_USA)
{
SetPlayerColor(playerid, 0xFF000000);
SetPlayerColor(i, 0x0000FF00);
ShowPlayerNameTagForPlayer(playerid,i,0);
}
if(gTeam[playerid] == TEAM_USA && gTeam[i] == TEAM_RUS)
{
SetPlayerColor(playerid, 0x0000FF00);
SetPlayerColor(i, 0xFF000000);
ShowPlayerNameTagForPlayer(playerid,i,0);
}
if(gTeam[playerid] == TEAM_USA && gTeam[i] == TEAM_USA)
{
//SetPlayerColor(playerid, 0x0000FF00);
//SetPlayerColor(i, 0x0000FF00);
SetPlayerMarkerForPlayer(playerid,i,0x0000FFFF);
}
if(gTeam[playerid] == TEAM_RUS && gTeam[i] == TEAM_RUS)
{
//SetPlayerColor(playerid, 0xFF000000);
//SetPlayerColor(i, 0xFF000000);
SetPlayerMarkerForPlayer(playerid,i,0xFF0000FF);
}
}
new color = GetPlayerColor(playerid);
for(new i, j = GetPlayerPoolSize(); i <= j; i++)
{
SetPlayerMarkerForPlayer(i, playerid, (gTeam[i] == gTeam[playerid]) ? color | 0xFF : color & ~0xFF);
}
? color | 0xFF : color & ~0xFF)
SetPlayerMarkerForPlayer(i, playerid, (gTeam[i] == gTeam[playerid]) ? color | 0xFF : color & ~0xFF);
SetPlayerMarkerForPlayer(i, playerid, (gTeam[i] == gTeam[playerid]) ? color | 0xFF0000FF : color & ~0xFF0000FF);
For example i want red so i need to do:
pawn Code:
Also how that code make difference is player team_usa (blue color) or team_rus (red color)? |
/* set the players color somewhere earlier in the code (for example when they choose their team), this should return either red or blue (RUS and USA): */ new color = GetPlayerColor(playerid); //this code should be run when any player changes team: for(new i; i <= GetPlayerPoolSize(); i++) //loop through all players { /* set blip color for everyone else on playerid's minimap, if team is the same it'll set it to player's color otherwise it'll be invisible: */ SetPlayerMarkerForPlayer(i, playerid, (gTeam[i] == gTeam[playerid]) ? color | 0xFF : color & ~0xFF); }
SetPlayerMarkerForPlayer(i, playerid, (gTeam[i] == gTeam[playerid]) ? color | 0xFF : color & ~0xFF);// Do i need to change this 0xFF to my color or just leave it like this?