03.06.2011, 06:35
Hi, in my script there are some teams that have colors (like the cops), but I have also families/gangs and they have no color, they are all white. I want to give each family a color, but I don't know how. This is how it is now with the cops colors.
Код:
public SetPlayerToTeamColor(playerid) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pWantedLevel] != 6) { if(PlayerInfo[playerid][pMember] == 0 && PlayerInfo[playerid][pLeader] == 0) { SetPlayerColor(playerid, TCOLOR_WHITE); } else if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1) { if(PlayerInfo[playerid][pOnDuty] == 1) { SetPlayerColor(playerid, TCOLOR_BLUE); } else { SetPlayerColor(playerid, TCOLOR_WHITE); } } else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) { if(PlayerInfo[playerid][pOnDuty] == 1) { SetPlayerColor(playerid, TCOLOR_NAVYBLUE); } else { SetPlayerColor(playerid, TCOLOR_WHITE); } } else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3) { if(PlayerInfo[playerid][pOnDuty] == 1) { SetPlayerColor(playerid, TCOLOR_BEIGE); } else { SetPlayerColor(playerid, TCOLOR_WHITE); } } else if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5) { if(PlayerInfo[playerid][pOnDuty] == 1) { SetPlayerColor(playerid, TCOLOR_LIGHTGREEN); } else {SetPlayerColor(playerid, TCOLOR_WHITE); } } else if(PlayerInfo[playerid][pJailed] == 2) { SetPlayerColor(playerid, TCOLOR_PRISON); } else if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4) { SetPlayerColor(playerid, TCOLOR_WHITE); } else if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6) { SetPlayerColor(playerid, TCOLOR_WHITE); } else if(PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7) { SetPlayerColor(playerid, TCOLOR_WHITE); } else if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8) { SetPlayerColor(playerid, TCOLOR_WHITE); } else if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9) { SetPlayerColor(playerid, TCOLOR_LIGHTBLUE); } else if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10) { SetPlayerColor(playerid, TCOLOR_WHITE); } } else { SetPlayerColor(playerid, TCOLOR_WANTED); } if(PlayerInfo[playerid][pVipColor] == 1) { SetPlayerColor(playerid, 0x80008000); } } return 1; }