LA-RP - Jedes Team eine Farbe

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
  • Hey,
    Wie kann man einstellen, das jedes Team (Fraktion) ne andere Farbe bei - TAB - hat?
    Also nicht nur On Duty sondrn immer.
    z.B Groove ist Grün in der Serverlist, alle mitglieder aus der GS haben dann immer eine Grüne farbe?
    Geht das einfach?


    Danke

  • Unter OnplayerSpawn



    if(pInfo[playerid][Leader] == 1) // ISt immer anders
    {
    SetPlayerColor(playerid,FARBE); //EDIT
    return 1;
    }


    Grüße,
    NeoX

    Einmal editiert, zuletzt von [LoL]NeoX ()

  • C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4251) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4251) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4253) : error 017: undefined symbol "BLUE"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4256) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4256) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4261) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4261) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4266) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4266) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4268) : error 017: undefined symbol "BLUE"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4271) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4271) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4273) : error 017: undefined symbol "BLUE"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4276) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4276) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4278) : error 017: undefined symbol "BLUE"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4281) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4281) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4283) : error 017: undefined symbol "BLUE"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4286) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4286) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4288) : error 017: undefined symbol "BLUE"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4291) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4291) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4293) : error 017: undefined symbol "BLUE"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4296) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4296) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4298) : error 017: undefined symbol "BLUE"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4301) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4301) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4303) : error 017: undefined symbol "BLUE"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4306) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4306) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4308) : error 017: undefined symbol "BLUE"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase




    public OnPlayerSpawn(playerid)
    {
    InitLockDoors(playerid);
    STDPlayer[playerid] = 0;
    gTeam[playerid] = PlayerInfo[playerid][pTeam]; //Set the Team
    if (gTeam[playerid] == 4) //medic / criminal reset team
    {
    gTeam[playerid] = 3;
    }
    if(gPlayerLogged[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_LIGHTRED, "** Du musst dich erst einloggen (Kicked) **");
    KickPlayer[playerid] = 1;
    }
    //NEU
    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember == 1) // Polizei
    {
    SetPlayerColor(playerid,BLUE)
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember == 2) // FBI>
    {
    SetPlayerColor(playerid,LIGHTBLUE)
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember == 3) // Bundeswehr
    {
    SetPlayerColor(playerid,GREEN)
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 4 || PlayerInfo[playerid][pMember == 4) // Rettungsdienst
    {
    SetPlayerColor(playerid,BLUE)
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember == 5) // Yakuza
    {
    SetPlayerColor(playerid,BLUE)
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember == 6) // LCN
    {
    SetPlayerColor(playerid,BLUE)
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 7 || PlayerInfo[playerid][pMember == 7) // Regierung
    {
    SetPlayerColor(playerid,BLUE)
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember == 8) // Hitman
    {
    SetPlayerColor(playerid,BLUE)
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 9 || PlayerInfo[playerid][pMember == 9) // Nachrichten
    {
    SetPlayerColor(playerid,BLUE)
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pMember == 10) // Taxi
    {
    SetPlayerColor(playerid,BLUE)
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pMember == 15) // Grove
    {
    SetPlayerColor(playerid,BLUE)
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 16 || PlayerInfo[playerid][pMember == 16) // Balas
    {
    SetPlayerColor(playerid,BLUE)
    return 1;
    }//NEU
    if(gTeam[playerid] == 11 && PlayerInfo[playerid][pLeader] < 1)
    {
    MedicBill[playerid] = 0;
    new rand = random(sizeof(CIV));
    SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist kein Leader einer Fraktion, du bist ein Zivilist!");
    PlayerInfo[playerid][pTeam] = 3;
    gTeam[playerid] = 3;
    SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
    PlayerInfo[playerid][pModel] = CIV[rand];
    SpawnPlayer(playerid);
    }
    if(gTeam[playerid] == 5)
    {
    if(PlayerInfo[playerid][pMember] < 1)
    {
    MedicBill[playerid] = 0;
    new rand = random(sizeof(CIV));
    SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist in keiner Familie mehr, du bist nun ein Zivilist!");
    PlayerInfo[playerid][pTeam] = 3;
    gTeam[playerid] = 3;
    SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
    PlayerInfo[playerid][pModel] = CIV[rand];
    SpawnPlayer(playerid);
    }
    }

  • C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4251) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4251) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4253) : error 017: undefined symbol "BLUE"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4256) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4256) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4261) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4261) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4266) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4266) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4268) : error 017: undefined symbol "PURPLE"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4271) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4271) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4273) : error 017: undefined symbol "GRAD5"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4276) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4276) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4278) : error 017: undefined symbol "GRED6"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4281) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4281) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4286) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4286) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4288) : error 017: undefined symbol "HIT_COLOR"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4291) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4291) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4293) : error 017: undefined symbol "NEWS"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4296) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4296) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4298) : error 017: undefined symbol "YELLOW2"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4301) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4301) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4303) : error 017: undefined symbol "GROOVE"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4306) : warning 213: tag mismatch
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4306) : error 001: expected token: "]", but found ")"
    C:\Users\Administrator.Notebook\Desktop\GTARP\gamemodes\gtarp.pwn(4308) : error 017: undefined symbol "BALLAS"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    21 Errors.



    public OnPlayerSpawn(playerid)
    {
    InitLockDoors(playerid);
    STDPlayer[playerid] = 0;
    gTeam[playerid] = PlayerInfo[playerid][pTeam]; //Set the Team
    if (gTeam[playerid] == 4) //medic / criminal reset team
    {
    gTeam[playerid] = 3;
    }
    if(gPlayerLogged[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_LIGHTRED, "** Du musst dich erst einloggen (Kicked) **");
    KickPlayer[playerid] = 1;
    }
    //NEU
    if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember == 1) // Polizei
    {
    SetPlayerColor(playerid,BLUE);
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember == 2) // FBI>
    {
    SetPlayerColor(playerid,LIGHTBLUE);
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember == 3) // Bundeswehr
    {
    SetPlayerColor(playerid,GREEN);
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 4 || PlayerInfo[playerid][pMember == 4) // Rettungsdienst
    {
    SetPlayerColor(playerid,PURPLE);
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pMember == 5) // Yakuza
    {
    SetPlayerColor(playerid,GRAD5);
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember == 6) // LCN
    {
    SetPlayerColor(playerid,GRED6);
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 7 || PlayerInfo[playerid][pMember == 7) // Regierung
    {
    SetPlayerColor(playerid,YELLOW);
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 8 || PlayerInfo[playerid][pMember == 8) // Hitman
    {
    SetPlayerColor(playerid,HIT_COLOR);
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 9 || PlayerInfo[playerid][pMember == 9) // Nachrichten
    {
    SetPlayerColor(playerid,NEWS);
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 10 || PlayerInfo[playerid][pMember == 10) // Taxi
    {
    SetPlayerColor(playerid,YELLOW2);
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 15 || PlayerInfo[playerid][pMember == 15) // Grove
    {
    SetPlayerColor(playerid,GROOVE);
    return 1;
    }
    if(PlayerInfo[playerid][pLeader] == 16 || PlayerInfo[playerid][pMember == 16) // Balas
    {
    SetPlayerColor(playerid,BALLAS);
    return 1;
    }//NEU
    if(gTeam[playerid] == 11 && PlayerInfo[playerid][pLeader] < 1)
    {
    MedicBill[playerid] = 0;
    new rand = random(sizeof(CIV));
    SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist kein Leader einer Fraktion, du bist ein Zivilist!");
    PlayerInfo[playerid][pTeam] = 3;
    gTeam[playerid] = 3;
    SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
    PlayerInfo[playerid][pModel] = CIV[rand];
    SpawnPlayer(playerid);
    }
    if(gTeam[playerid] == 5)
    {
    if(PlayerInfo[playerid][pMember] < 1)
    {
    MedicBill[playerid] = 0;
    new rand = random(sizeof(CIV));
    SendClientMessage(playerid, COLOR_LIGHTRED, "Du bist in keiner Familie mehr, du bist nun ein Zivilist!");
    PlayerInfo[playerid][pTeam] = 3;
    gTeam[playerid] = 3;
    SetSpawnInfo(playerid, gTeam[playerid], CIV[rand],0.0,0.0,0.0,0,0,0,0,0,0,0);
    PlayerInfo[playerid][pModel] = CIV[rand];
    SpawnPlayer(playerid);
    }
    }


    farben sind oben definiert...

  • zum farben definieren benutze am besten den samp color picker

    Zita aus dem Livestream chat von Internetlink von BigYoda ;)


    Zitat

    BigYoda: Ink sagt: "Ach OnGamemodeInit brauchen wir nicht löschen" Yoda: "Was ist das andere für ein Kram?". Ink: "Egal lösch einfach alles". Tutorial Ende :D





    DDG is Back


    Froum: DDG Forum
    Server IP: 85.25.20.59:7777
    Team Speak 3: 85.25.20.59

  • Tut mir leit musst es so machen


    SetPlayerColor(playerid,BLUE);

  • ich hab es so SetPlayerColor(playerid,COLOR_GROOVE);
    und so SetPlayerColor(playerid,GROOVE);
    probiert beides geht nicht

  • die farben musst du ja auch erstmal ob definieren...

    Zita aus dem Livestream chat von Internetlink von BigYoda ;)


    Zitat

    BigYoda: Ink sagt: "Ach OnGamemodeInit brauchen wir nicht löschen" Yoda: "Was ist das andere für ein Kram?". Ink: "Egal lösch einfach alles". Tutorial Ende :D





    DDG is Back


    Froum: DDG Forum
    Server IP: 85.25.20.59:7777
    Team Speak 3: 85.25.20.59

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Ah, sy kan geclosed werden^^
    Hab den Fehler entdeckt
    if(PlayerInfo[playerid][pLeader] == 16 || PlayerInfo[playerid][pMember == 16)


    Uss aber so sein
    if(PlayerInfo[playerid][pLeader] == 16 || PlayerInfo[playerid][pMember] == 16)