SetPlayerToTeamColor

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Moin, ich hab kleines Problemm mit dem SetPlayerToTeamColor, unzwar werden mir die leute auf der map angezeigt jedoch will ich nur das sie im "tab" angezeigt werden, wenn ich z.b. medic farbe nehme das die medic so pink sind dann ist der medic auf der map meine code:



    #define NAMECOLOR_LSCOP 0x1E90FF00
    #define NAMECOLOR_SFCOP 0x00008000
    #define NAMECOLOR_ARMY 0x00CA0000
    #define NAMECOLOR_TAXI 0xFFFF00AA
    #define NAMECOLOR_MEDIC 0xFF8181AA
    #define NAMECOLOR_CNN 0xFF9900AA



    diese fraktionen will ich als farbe haben jedoch geht es nicht...




    public SetPlayerToTeamColor(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
    {
    SetPlayerColor(playerid,NAMECOLOR_LSCOP);
    }
    else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
    {
    SetPlayerColor(playerid,NAMECOLOR_LSCOP);
    }
    else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
    {
    SetPlayerColor(playerid,NAMECOLOR_ARMY); // Armyfarbe
    }
    else if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
    {
    SetPlayerColor(playerid,NAMECOLOR_MEDIC); //die sind auf der map
    }
    else if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    else if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    else if(PlayerInfo[playerid][pLeader] == 7)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    else if(PlayerInfo[playerid][pMember] == 7)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    else if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    else if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    else if(PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    else if(PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    else if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    else if(PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    else if(PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    else if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    else if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR); /
    }
    else if(PlayerInfo[playerid][pMember] == 17 || PlayerInfo[playerid][pLeader] == 17)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }


    else if(PlayerInfo[playerid][pMember] == 18 || PlayerInfo[playerid][pLeader] == 18)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    else if(PlayerInfo[playerid][pMember] == 20 || PlayerInfo[playerid][pLeader] == 20)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR); // white
    }
    else if(PlayerInfo[playerid][pMember] == 21 || PlayerInfo[playerid][pLeader] == 21)
    {
    SetPlayerColor(playerid,NAMECOLOR_SFCOP); // FBIfarbe
    }
    else if(PlayerInfo[playerid][pMember] == 22 || PlayerInfo[playerid][pLeader] == 22)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    else if(PlayerInfo[playerid][pMember] == 23 || PlayerInfo[playerid][pLeader] == 23)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    else if(PlayerInfo[playerid][pMember] == 24 || PlayerInfo[playerid][pLeader] == 24)
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    else
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    }
    }


    Ich hoffe Ihr könnt mir ein bisschen Helfen :)


    mfg iWeeDy


    /EDIT Text überarbeitet