/Admins Fail

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
  • Hallo, ich habe ein Problem, undzwa das wenn man /admins macht und ein Projektleiter (oder ein admin über 1339) on ist, das da Steht:


    Projektleiter: <name>
    2012* Admin: <name>


    Wie kann ich das machen, das da nur Projektleiter steht und nicht noch Admin?


    Hier mal der Befehl:


    if (strcmp(cmd, "/admins", true) == 0 || strcmp(cmd, "/supporter", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    SendClientMessage(playerid, COLOR_GRAD1, " ");
    SendClientMessage(playerid, COLOR_GRAD1, " Admins und Supporter:");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerInfo[i][pAdmin] >= 1)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string)," %d* Admin: %s[%d] Nummer: %d",PlayerInfo[i][pAdmin],sendername,i,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    if(PlayerInfo[i][pSupporter] >=1)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string)," %d* Supporter: %s[%d] Nummer: %d",PlayerInfo[i][pSupporter],sendername,i,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    if(PlayerInfo[i][pSupporter] == 6)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string)," %d* Admin: %s[%d] Nummer: %d",PlayerInfo[i][pSupporter],sendername,i,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    if(PlayerInfo[i][pAdmin] >= 2000)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string)," %d* Projektleiter: %s[%d] Nummer: %d",PlayerInfo[i][pAdmin],sendername,i,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    }
    }
    }



    Hoffe ihr helft mir

  • if (strcmp(cmd, "/admins", true) == 0 || strcmp(cmd, "/supporter", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    SendClientMessage(playerid, COLOR_GRAD1, " ");
    SendClientMessage(playerid, COLOR_GRAD1, " Admins und Supporter:");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerInfo[i][pSupporter] >=1)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string)," %d* Supporter: %s[%d] Nummer: %d",PlayerInfo[i][pSupporter],sendername,i,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    if(PlayerInfo[i][pSupporter] == 6)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string)," %d* Admin: %s[%d] Nummer: %d",PlayerInfo[i][pSupporter],sendername,i,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    if(PlayerInfo[i][pAdmin] >= 2000)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string)," %d* Projektleiter: %s[%d] Nummer: %d",PlayerInfo[i][pAdmin],sendername,i,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    }
    }
    }

  • Aber dann zeigt er doch die Admins unter 1339 nicht mehr an oder ?

  • if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 2000)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string)," %d* Admin: %s[%d] Nummer: %d",PlayerInfo[i][pAdmin],sendername,i,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }

    Wer ist der Mensch hinter der Uniform? Ist euch das bekannt?
    Es ist der selbe der noch eben in Zivil neben euch stand.
    Warum wird er gehasst und so selten respektiert?
    Warum ist er derjenige der seinen Hals für euch riskiert?
    Trägt der Bulle eine Weste, das hat er früher nie gemacht,
    die Zeiten haben sich geändert und jeder Dienst ist ein Kampf!
    Warum gibt’s das SEK und warum sind sie so brutal?
    Und wieso hat wieder einer mit seinem Leben bezahlt?

  • Hier mein System ;)


    if (strcmp(cmd, "/admins", true) == 0 || strcmp(cmd, "/supporter", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "___Admins/Supporter On Duty:___");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerInfo[i][pSupporter] == 1)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string),"[GrR]Suppoter Level 1: %s || Nummer: %d",sendername,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    if(PlayerInfo[i][pSupporter] == 2)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string),"[GrR]Supporter Level 2: %s || Nummer: %d",sendername,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    if(PlayerInfo[i][pSupporter] == 3)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string),"[GrR]Supporter Level 3: %s || Nummer: %d",sendername,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    if(PlayerInfo[i][pSupporter] == 4)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string),"[GrR]Supporter Level 4: %s || Nummer: %d",sendername,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    if(PlayerInfo[i][pAdmin] == 1)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string),"[GrR]Moderator: %s || Nummer: %d",sendername,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    if(PlayerInfo[i][pAdmin] == 2)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string),"[GrR]Moderator: %s || Nummer: %d",sendername,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    if(PlayerInfo[i][pAdmin] == 3)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string),"[GrR]Moderator: %s || Nummer: %d",sendername,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    if(PlayerInfo[i][pAdmin] == 4)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string),"[GrR]Super Moderator: %s || Nummer: %d",sendername,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    if(PlayerInfo[i][pAdmin] == 1337)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string),"[GrR]High Administrator: %s || Nummer: %d",sendername,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    if(PlayerInfo[i][pAdmin] == 1338)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string),"[GrR]High Administrator: %s || Nummer: %d",sendername,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    if(PlayerInfo[i][pAdmin] == 2000)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string),"[GrR]High Administrator: %s || Nummer: %d",sendername,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    if(PlayerInfo[i][pAdmin] == 2001)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string),"[GrR]Scripter: %s || Nummer: %d",sendername,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    if(PlayerInfo[i][pAdmin] == 2009)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string),"[GrR]stellv.Projektleiter: %s || Nummer: %d",sendername,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid,COLOR_LIGHTBLUE, string);
    }
    if(PlayerInfo[i][pAdmin] == 2010)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string),"[GrR] Server Owner & Spendenverwalter: %s || Nummer: %d",sendername,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    }
    }
    }
    }
    return 1;
    }

  • Entschuldigung verlesen.
    So wäre es richtig.


    if (strcmp(cmd, "/admins", true) == 0 || strcmp(cmd, "/supporter", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    SendClientMessage(playerid, COLOR_GRAD1, " ");
    SendClientMessage(playerid, COLOR_GRAD1, " Admins und Supporter:");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(PlayerInfo[i][pAdmin] >= 2000)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string)," %d* Admin: %s[%d] Nummer: %d",PlayerInfo[i][pAdmin],sendername,i,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    if(PlayerInfo[i][pSupporter] >=1)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string)," %d* Supporter: %s[%d] Nummer: %d",PlayerInfo[i][pSupporter],sendername,i,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    if(PlayerInfo[i][pSupporter] == 6)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string)," %d* Admin: %s[%d] Nummer: %d",PlayerInfo[i][pSupporter],sendername,i,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    if(PlayerInfo[i][pAdmin] >= 2000)
    {
    GetPlayerName(i, sendername, sizeof(sendername));
    format(string,sizeof(string)," %d* Projektleiter: %s[%d] Nummer: %d",PlayerInfo[i][pAdmin],sendername,i,PlayerInfo[i][pPnumber]);
    SendClientMessage(playerid, COLOR_GRAD2, string);
    }
    }
    }
    }