/aduty und /ooc

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,


    Also wenn ein Adminstrator im OOChat schreibt steht dort Adminstrator Name: Text ( Adminstrator Admin Rank 3 ) aber wenn ein Moderator dort schreiben will passiert nichts ( Admin Rank 1 )... wieso? Ich finde es einfach nicht heraus.


    Code:
    if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(gPlayerLogged[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist noch nicht Eingeloggt !");
    return 1;
    }
    if(PlayerInfo[playerid][pMuted] == 1)
    {
    SendClientMessage(playerid, TEAM_CYAN_COLOR, " Du kannst nicht sprechen, du bist gemutet !");
    return 1;
    }
    GetPlayerName(playerid, sendername, sizeof(sendername));
    new length = strlen(cmdtext);
    while ((idx < length) && (cmdtext[idx] <= ' '))
    {
    idx++;
    }
    new offset = idx;
    new result[64];
    while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
    {
    result[idx - offset] = cmdtext[idx];
    idx++;
    }
    result[idx - offset] = EOS;
    if(!strlen(result))
    {
    SendClientMessage(playerid, COLOR_GRAD2, "NUTZUNG: (/o)oc [ooc chat]");
    return 1;
    }
    if(PlayerInfo[playerid][pAdmin] == 1)
    {
    format(string, sizeof(string), "(( {FF0005}Moderator{FFFFFF} %s: %s ))", sendername, result);
    }
    if(PlayerInfo[playerid][pAdmin] == 2)
    {
    format(string, sizeof(string), "(( {FF0005}Super Moderator{FFFFFF} %s: %s ))", sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 3)
    {
    format(string, sizeof(string), "(( {FF0005}Adminstrator{FFFFFF} %s: %s ))", sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 1337)
    {
    format(string, sizeof(string), "(( {FF0005}Adminstrator 1337{FFFFFF} %s: %s ))", sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 1338)
    {
    format(string, sizeof(string), "(( {FF0005}Fraktionsverwalter{FFFFFF} %s: %s ))", sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 1339)
    {
    format(string, sizeof(string), "(( {FF0005}High-Adminstrator{FFFFFF} %s: %s ))", sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 2000)
    {
    format(string, sizeof(string), "(( {FF0005}Server-Manager{FFFFFF} %s: %s ))", sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 2001)
    {
    format(string, sizeof(string), "(( {FF0005}Projektleitung{FFFFFF} %s: %s ))", sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] >= 2002)
    {
    format(string, sizeof(string), "(( {FF0005}Projektleitung{FFFFFF} %s: %s ))", sendername, result);
    }
    else if(PlayerInfo[playerid][pSupporter] == 1)
    {
    format(string, sizeof(string), "(( {FF0005}Supporter{FFFFFF} %s: %s ))", sendername, result);
    }
    else if(PlayerInfo[playerid][pAdmin] == 0 && (noooc))
    {
    format(string, sizeof(string), "(({FFFFFF} %s: %s ))", sendername, result);
    }
    else return 1;
    OOCOff(COLOR_OOC,string);
    Log("OA-Chat.txt",string);
    }
    return 1;
    }


    Bei /aduty kann der Moderator /aduty gehen aber wenn er wieder /aduty macht um den Admin Dienst zu verlassen steht dort Supporter %s hat den.... aber es sollte Moderator %s hat den.... stehen.


    Code:
    if (strcmp(cmd, "/adminduty", true) == 0 || strcmp(cmd, "/aduty", true) == 0)
    {
    if(AdminDuty[playerid] == 0)
    {
    if(PlayerInfo[playerid][pAdmin] == 1)
    {
    SetPlayerColor(playerid,0xFF0A00FF);
    AdminDuty[playerid] = 1;
    Mod[playerid] = Create3DTextLabel("Moderator on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(Mod[playerid], playerid, 0.0, 0.0, 0.4);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string,sizeof(string),"Moderator %s ist nun im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    return 1;
    }
    else if(PlayerInfo[playerid][pAdmin] == 2)
    {
    SetPlayerColor(playerid,0xFF0A00FF);
    AdminDuty[playerid] = 1;
    Mod[playerid] = Create3DTextLabel("Super Moderator on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(Mod[playerid], playerid, 0.0, 0.0, 0.4);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string,sizeof(string),"Super Moderator %s ist nun im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    return 1;
    }
    else if(PlayerInfo[playerid][pAdmin] == 3)
    {
    SetPlayerColor(playerid,0xFF0A00FF);
    AdminDuty[playerid] = 1;
    Supermod[playerid] = Create3DTextLabel("Administrator on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(Supermod[playerid], playerid, 0.0, 0.0, 0.4);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string,sizeof(string),"Administrator %s ist nun im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    return 1;
    }
    else if(PlayerInfo[playerid][pAdmin] == 1337)
    {
    SetPlayerColor(playerid,0xFF0A00FF);
    AdminDuty[playerid] = 1;
    Admin[playerid] = Create3DTextLabel("1337 Administrator on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string,sizeof(string),"1337 Adminstrator %s ist nun im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    return 1;
    }
    else if(PlayerInfo[playerid][pAdmin] == 1338)
    {
    SetPlayerColor(playerid,0xFF0A00FF);
    AdminDuty[playerid] = 1;
    Admin[playerid] = Create3DTextLabel("Fraktionsverwalter on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string,sizeof(string),"Fraktionsverwalter %s ist nun im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    return 1;
    }
    else if(PlayerInfo[playerid][pAdmin] == 1339)
    {
    SetPlayerColor(playerid,0xFF0A00FF);
    AdminDuty[playerid] = 1;
    Admin[playerid] = Create3DTextLabel("High-Adminstrator on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string,sizeof(string),"High-Adminstrator %s ist nun im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    return 1;
    }
    else if(PlayerInfo[playerid][pAdmin] == 2000)
    {
    SetPlayerColor(playerid,0xFF0A00FF);
    AdminDuty[playerid] = 1;
    Admin[playerid] = Create3DTextLabel("Server-Manager on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string,sizeof(string),"Server-Manager %s ist nun im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    return 1;
    }
    else if(PlayerInfo[playerid][pAdmin] == 2001)
    {
    SetPlayerColor(playerid,0xFF0A00FF);
    AdminDuty[playerid] = 1;
    Admin[playerid] = Create3DTextLabel("Projektleitung on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string,sizeof(string),"Projektleitung %s ist nun im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    return 1;
    }
    else if(PlayerInfo[playerid][pAdmin] == 2002)
    {
    SetPlayerColor(playerid,0xFF0A00FF);
    AdminDuty[playerid] = 1;
    Admin[playerid] = Create3DTextLabel("Projektleitung on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(Admin[playerid], playerid, 0.0, 0.0, 0.4);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string,sizeof(string),"Projektleitung %s ist nun im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    return 1;
    }
    else if(PlayerInfo[playerid][pSupporter] == 1)
    {
    SetPlayerColor(playerid,0xFF0A00FF);
    AdminDuty[playerid] = 1;
    Supporter[playerid] = Create3DTextLabel("Supporter on Duty",0xFF0A00FF,30.0,40.0,50.0,40.0,0);
    Attach3DTextLabelToPlayer(Supporter[playerid], playerid, 0.0, 0.0, 0.4);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string,sizeof(string),"Supporter %s ist nun im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    return 1;
    }
    }
    if(AdminDuty[playerid] == 1)
    {
    if(PlayerInfo[playerid][pAdmin] == 1)
    {
    format(string,sizeof(string),"Moderator %s ist nun nicht mehr im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    SetPlayerHealth(playerid, 100);
    }
    if(PlayerInfo[playerid][pAdmin] == 2)
    {
    format(string,sizeof(string),"Super Moderator %s ist nun nicht mehr im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    SetPlayerHealth(playerid, 100);
    }
    else if(PlayerInfo[playerid][pAdmin] == 3)
    {
    format(string,sizeof(string),"Administrator %s ist nun nicht mehr im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    SetPlayerHealth(playerid, 100);
    }
    else if(PlayerInfo[playerid][pAdmin] == 1337)
    {
    format(string,sizeof(string),"1337 Administrator %s ist nun nicht mehr im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    SetPlayerHealth(playerid, 100);
    }
    else if(PlayerInfo[playerid][pAdmin] == 1338)
    {
    format(string,sizeof(string),"Fraktionsverwalter %s ist nun nicht mehr im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    SetPlayerHealth(playerid, 100);
    }
    else if(PlayerInfo[playerid][pAdmin] == 1339)
    {
    format(string,sizeof(string),"High-Adminstrator %s ist nun nicht mehr im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    SetPlayerHealth(playerid, 100);
    }
    else if(PlayerInfo[playerid][pAdmin] == 2000)
    {
    format(string,sizeof(string),"Server-Manager %s ist nun nicht mehr im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    SetPlayerHealth(playerid, 100);
    }
    else if(PlayerInfo[playerid][pAdmin] == 2001)
    {
    format(string,sizeof(string),"Projektleitung %s ist nun nicht mehr im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    SetPlayerHealth(playerid, 100);
    }
    else if(PlayerInfo[playerid][pAdmin] == 2002)
    {
    format(string,sizeof(string),"Projektleitung %s ist nun nicht mehr im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    SetPlayerHealth(playerid, 100);
    }
    else if(PlayerInfo[playerid][pSupporter] == 1)
    {
    format(string,sizeof(string),"Supporter %s ist nun nicht mehr im Dienst",sendername,playerid);
    SendClientMessageToAll(0xFF0A00FF, string);
    SetPlayerHealth(playerid, 100);
    }
    Delete3DTextLabel(Admin[playerid]);
    Delete3DTextLabel(Supermod[playerid]);
    Delete3DTextLabel(Mod[playerid]);
    Delete3DTextLabel(Supporter[playerid]);
    Delete3DTextLabel(Admin[playerid]);
    Delete3DTextLabel(Supermod[playerid]);
    Delete3DTextLabel(Mod[playerid]);
    Delete3DTextLabel(Supporter[playerid]);
    AdminDuty[playerid] = 0;
    {
    if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
    {
    SetPlayerColor(playerid, NAMECOLOR_LSCOP);
    }
    else
    {
    SetPlayerColor(playerid,TEAM_HIT_COLOR);
    }
    }
    return 1;
    }
    return 1;
    }

    Mit freundlichen Grüßen