/aduty message bug

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 liebes brotfisch also ich habe ein /aduty befehle ich bin admin 2002 und ich gehe als admin aduty off aber dann steht da du bist nun als Head-admin Off duty? hää? ich habe alles versucht ?
    da steht dann ingame Head-admin SGamer ist nicht mehr im dienst ob wohl ich admin 2002 bin und head-admin erst ab 1337


    if (strcmp(cmd, "/adminduty", true) == 0 || strcmp(cmd, "/aduty", true) == 0)
    {
    if(AdminDuty[playerid] == 0)
    {
    if(PlayerInfo[playerid][pAdmin] == 1)
    {
    TextDrawShowForPlayer(playerid,SupportBubble);
    for(new si;si<sizeof(SupportInfo);si++)
    {
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Text]);
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Nummern]);
    }
    SendClientMessage(playerid,0xC800FFFF,"Du bist nun als Moderator im Dienst!");
    SetPlayerColor(playerid,0xC800FFFF);
    AdminDuty[playerid] = 1;
    Mod[playerid] = Create3DTextLabel("*Moderator on Duty*",0xC800FFFF,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[ID:%d] ist nun im Dienst [Er ist Lilla markiert]*",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    SetPlayerHealth(playerid, 0x7F800000);
    SetPlayerArmour(playerid, 100);
    return 1;
    }
    else if(PlayerInfo[playerid][pAdmin] == 2)
    {
    TextDrawShowForPlayer(playerid,SupportBubble);
    for(new si;si<sizeof(SupportInfo);si++)
    {
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Text]);
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Nummern]);
    }
    SendClientMessage(playerid,0xC800FFFF,"Du bist nun als Super-Moderator im Dienst!");
    SetPlayerColor(playerid,0xC800FFFF);
    AdminDuty[playerid] = 1;
    Mod[playerid] = Create3DTextLabel("*Super-Moderator on Duty*",0xC800FFFF,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[ID:%d] ist nun im Dienst [Er ist Lila markiert]*",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    SetPlayerHealth(playerid, 0x7F800000);
    SetPlayerArmour(playerid, 100);
    return 1;
    }
    else if(PlayerInfo[playerid][pAdmin] == 3)
    {
    TextDrawShowForPlayer(playerid,SupportBubble);
    for(new si;si<sizeof(SupportInfo);si++)
    {
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Text]);
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Nummern]);
    }
    SendClientMessage(playerid,COLOR_ORANGE,"Du bist nun als Administrator im Dienst!");
    SetPlayerColor(playerid,0xC800FFFF);
    AdminDuty[playerid] = 1;
    Supermod[playerid] = Create3DTextLabel("*Administrator on Duty*",0xC800FFFF,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[ID:%d] ist nun im Dienst [Er ist Lila markiert]*",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    SetPlayerHealth(playerid, 0x7F800000);
    SetPlayerArmour(playerid, 100);
    return 1;
    }
    else if(PlayerInfo[playerid][pAdmin] == 4)
    {
    TextDrawShowForPlayer(playerid,SupportBubble);
    for(new si;si<sizeof(SupportInfo);si++)
    {
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Text]);
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Nummern]);
    }
    SendClientMessage(playerid,COLOR_ORANGE,"Du bist nun als Administrator im Dienst!");
    SetPlayerColor(playerid,0xC800FFFF);
    AdminDuty[playerid] = 1;
    Supermod[playerid] = Create3DTextLabel("*Administrator on Duty*",0xC800FFFF,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[ID:%d] ist nun im Dienst [Er ist Lila markiert]*",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    SetPlayerHealth(playerid, 0x7F800000);
    SetPlayerArmour(playerid, 100);
    return 1;

    }
    else if(PlayerInfo[playerid][pAdmin] == 5)
    {
    TextDrawShowForPlayer(playerid,SupportBubble);
    for(new si;si<sizeof(SupportInfo);si++)
    {
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Text]);
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Nummern]);
    }
    SendClientMessage(playerid,COLOR_ORANGE,"Du bist nun als Administrator im Dienst!");
    SetPlayerColor(playerid,0xC800FFFF);
    AdminDuty[playerid] = 1;
    Supermod[playerid] = Create3DTextLabel("*Administrator on Duty*",0xC800FFFF,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[ID:%d] ist nun im Dienst [Er ist Lila markiert]*",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    SetPlayerHealth(playerid, 0x7F800000);
    SetPlayerArmour(playerid, 100);
    return 1;


    }
    else if(PlayerInfo[playerid][pAdmin] ==1337)
    {
    TextDrawShowForPlayer(playerid,SupportBubble);
    for(new si;si<sizeof(SupportInfo);si++)
    {
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Text]);
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Nummern]);
    }
    SendClientMessage(playerid,0xC800FFFF,"Du bist nun als Head-Admin im Dienst!");
    SetPlayerColor(playerid,0xC800FFFF);
    AdminDuty[playerid] = 1;
    Admin[playerid] = Create3DTextLabel("*Head-Admin on Duty*",0xC800FFFF,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),"Head-Admin %s[ID:%d] ist nun im Dienst [Er ist Lila markiert]*",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    SetPlayerArmour(playerid, 100);
    return 1;
    }
    else if(PlayerInfo[playerid][pAdmin] ==1338)
    {
    TextDrawShowForPlayer(playerid,SupportBubble);
    for(new si;si<sizeof(SupportInfo);si++)
    {
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Text]);
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Nummern]);
    }
    SendClientMessage(playerid,0xC800FFFF,"Du bist nun als Full-Admin im Dienst!");
    SetPlayerColor(playerid,0xC800FFFF);
    AdminDuty[playerid] = 1;
    Admin[playerid] = Create3DTextLabel("*Full-Admin on Duty*",0xC800FFFF,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),"Full-Admin %s[ID:%d] ist nun im Dienst [Er ist Lila markiert]*",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    SetPlayerArmour(playerid, 100);
    return 1;
    }
    else if(PlayerInfo[playerid][pAdmin] ==2000)
    {
    TextDrawShowForPlayer(playerid,SupportBubble);
    for(new si;si<sizeof(SupportInfo);si++)
    {
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Text]);
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Nummern]);
    }
    SendClientMessage(playerid,0xC800FFFF,"Du bist nun als High Admin im Dienst!");
    SetPlayerColor(playerid,0xC800FFFF);
    AdminDuty[playerid] = 1;
    Admin[playerid] = Create3DTextLabel("*High Admin on Duty*",0xC800FFFF,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 Admin %s[ID:%d] ist nun im Dienst [Er ist Lila markiert]*",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    SetPlayerArmour(playerid, 100);
    return 1;
    }
    else if(PlayerInfo[playerid][pAdmin] ==2001)
    {
    TextDrawShowForPlayer(playerid,SupportBubble);
    for(new si;si<sizeof(SupportInfo);si++)
    {
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Text]);
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Nummern]);
    }
    SendClientMessage(playerid,0xC800FFFF,"Du bist nun als Stlv.Server-Leitung im Dienst!");
    SetPlayerColor(playerid,0xC800FFFF);
    AdminDuty[playerid] = 1;
    Admin[playerid] = Create3DTextLabel("*Stlv.Server-Leitung on Duty*",0xC800FFFF,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),"Stlv.Server-Leitung %s[ID:%d] ist nun im Dienst [Er ist Lila markiert]*",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    SetPlayerArmour(playerid, 100);
    return 1;
    }
    else if(PlayerInfo[playerid][pAdmin] >=2002)
    {
    TextDrawShowForPlayer(playerid,SupportBubble);
    for(new si;si<sizeof(SupportInfo);si++)
    {
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Text]);
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Nummern]);
    }
    SendClientMessage(playerid,0xC800FFFF,"Du bist nun als Server-Leitung im Dienst!");
    SetPlayerColor(playerid,0xC800FFFF);
    AdminDuty[playerid] = 1;
    Admin[playerid] = Create3DTextLabel("*Server-Leitung on Duty*",0xC800FFFF,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-Leitung %s[ID:%d] ist nun im Dienst [Er ist Lilamarkiert]*",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    SetPlayerArmour(playerid, 100);
    return 1;
    }
    else if(PlayerInfo[playerid][pSupporter] >= 1)
    {
    TextDrawShowForPlayer(playerid,SupportBubble);
    for(new si;si<sizeof(SupportInfo);si++)
    {
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Text]);
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Nummern]);
    }
    SendClientMessage(playerid,0xC800FFFF,"Du bist nun als Test-Supporter im Dienst!");
    SetPlayerColor(playerid,0xC800FFFF);
    AdminDuty[playerid] = 1;
    Supporter[playerid] = Create3DTextLabel("*Test-Supporter on Duty*",0xC800FFFF,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),"Test-Supporter %s[ID:%d] ist nun im Dienst [Er ist Lila markiert]*",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    SetPlayerHealth(playerid, 0x7F800000);
    SetPlayerArmour(playerid, 100);
    return 1;
    }
    else if(PlayerInfo[playerid][pSupporter] >= 2)
    {
    TextDrawShowForPlayer(playerid,SupportBubble);
    for(new si;si<sizeof(SupportInfo);si++)
    {
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Text]);
    TextDrawShowForPlayer(playerid,SupportInfo[si][S_Nummern]);
    }
    SendClientMessage(playerid,0xC800FFFF,"Du bist nun als Supporter im Dienst!");
    SetPlayerColor(playerid,0xC800FFFF);
    AdminDuty[playerid] = 1;
    Supporter[playerid] = Create3DTextLabel("*Supporter on Duty*",0xC800FFFF,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[ID:%d] ist nun im Dienst [Er ist Lila markiert]*",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    SetPlayerHealth(playerid, 0x7F800000);
    SetPlayerArmour(playerid, 100);
    return 1;
    }
    }
    if(AdminDuty[playerid] == 1)
    {
    TextDrawHideForPlayer(playerid,SupportBubble);
    for(new si;si<sizeof(SupportInfo);si++)
    {
    TextDrawHideForPlayer(playerid,SupportInfo[si][S_Text]);
    TextDrawHideForPlayer(playerid,SupportInfo[si][S_Nummern]);
    }
    if(PlayerInfo[playerid][pAdmin] == 1)
    {
    format(string,sizeof(string),"Moderator %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    }
    if(PlayerInfo[playerid][pAdmin] == 2)
    {
    format(string,sizeof(string),"Super-Moderator %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    }
    else if(PlayerInfo[playerid][pAdmin] == 3)
    {
    format(string,sizeof(string),"Administrator %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    }
    else if(PlayerInfo[playerid][pAdmin] == 4)
    {
    format(string,sizeof(string),"Administrator %s[ID]:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    }
    else if(PlayerInfo[playerid][pAdmin] == 5)
    {
    format(string,sizeof(string),"Administrator %s[ID]:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    }
    else if(PlayerInfo[playerid][pAdmin] >=1337)
    {
    format(string,sizeof(string),"Head-Admin %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    }
    else if(PlayerInfo[playerid][pAdmin] >=1338)
    {
    format(string,sizeof(string),"Full-Admin %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    }
    else if(PlayerInfo[playerid][pAdmin] >=1339)
    {
    format(string,sizeof(string),"Full-Admin %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    }
    else if(PlayerInfo[playerid][pAdmin] >=2000)
    {
    format(string,sizeof(string),"Full-Admin %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    }
    else if(PlayerInfo[playerid][pAdmin] >=2001)
    {
    format(string,sizeof(string),"Stlv.Server-Leitung %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    }
    else if(PlayerInfo[playerid][pAdmin] >=2002)
    {
    format(string,sizeof(string),"Server-Leitung %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    }
    else if(PlayerInfo[playerid][pSupporter] >= 1)
    {
    format(string,sizeof(string),"Test-Supporter %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    }
    else if(PlayerInfo[playerid][pSupporter] >= 2)
    {
    format(string,sizeof(string),"Supporter %s[ID:%d] ist nun nicht mehr im Dienst. *",sendername,playerid);
    SendClientMessageToAll(0xC800FFFF, string);
    }


    SendClientMessage(playerid,COLOR_YELLOW,"Du bist nun nichtmehr On Duty!");
    Delete3DTextLabel(Admin[playerid]);
    Delete3DTextLabel(Supermod[playerid]);
    Delete3DTextLabel(Mod[playerid]);
    Delete3DTextLabel(Supporter[playerid]);
    Delete3DTextLabel(Admin[playerid]);
    Delete3DTextLabel(Supermod[playerid]);
    Delete3DTextLabel(Mod[playerid]);
    Delete3DTextLabel(Supporter[playerid]);
    SetPlayerArmour(playerid, 0);
    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;
    }

  • Bei dem Code könnte ich direkt


    Warum jeden Rang abfragen ?


    Denkst du das Strings nur dazu da sind um Namen auszulesen ?


    format(string,sizeof(string),"%s %s(%i) ist nun im Dienst.",Adminrang(playerid),SpielerName(playerid),playerid);



    Stocks:


    stock Adminrang(playerid)
    {
    new rang[54];
    switch(SpielerInfo[playerid][Adminlevel])
    {
    case 0:{rang="";}
    case 1:{rang="{05FF00}Supporter";}
    case 2:{rang="{EBFF00}Moderator";}
    case 3:{rang="{0019FF}Administrator";}
    case 4:{rang="Techniker";}
    case 5:{rang="{FFC800}Super Administrator";}
    case 6:{rang="{FF8C00}Server Manager";}
    case 7:{rang="{FF0019}Serverleitung";}
    default:{rang="ERROR";}
    }
    return rang;
    }


    stock SpielerName(playerid)
    {
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    return name;
    }