Hab eine Frage bezüglich /aduty

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 Breadfish,


    ich hab mal eine Frage hierzu:


    if (strcmp(cmd, "/adminduty", true) == 0 || strcmp(cmd, "/aduty", true) == 0)
    {
    if(AdminDuty[playerid] == 0)
    {
    if(PlayerInfo[playerid][pAdmin] == 1 || PlayerInfo[playerid][pAdmin] == 2 || PlayerInfo[playerid][pAdmin] == 3)
    {
    SendClientMessage(playerid,COLOR_YELLOW,"AdmCmd : Du bist nun als Super-Administrator im Dienst!");
    SetPlayerColor(playerid,GRUEN);
    AdminDuty[playerid] = 1;
    Mod[playerid] = Create3DTextLabel("*Super-Administrator*",0xFF5000FF,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),"AdmCmd : Super-Administrator %s hat den Admindienst begonnen",sendername,playerid);
    SendClientMessageToAll(0x2DFF00FF, string);
    SetPlayerArmour(playerid, 100);
    SetPlayerSkin(playerid,279);
    return 1;
    }
    if(PlayerInfo[playerid][pAdmin] == 4 || PlayerInfo[playerid][pAdmin] == 1337)
    {
    SendClientMessage(playerid,0x41FF00FF,"AdmCmd : Du bist nun als Server-Manager im Dienst!");
    SetPlayerColor(playerid,GELB);
    AdminDuty[playerid] = 1;
    Supermod[playerid] = Create3DTextLabel("*Server-Manager*",0x0055FFFF,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),"AdmCmd : Server-Manager %s hat den Admindienst begonnen",sendername,playerid);
    SendClientMessageToAll(0x2DFF00FF, string);
    SetPlayerArmour(playerid, 100);
    SetPlayerSkin(playerid,279);
    return 1;
    }
    if(PlayerInfo[playerid][pAdmin] >=1338)
    {
    SendClientMessage(playerid,0x41FF00FF,"AdmCmd : Du bist nun als ServerOwner im Dienst!");
    SetPlayerColor(playerid,0x0A00FFFF);
    AdminDuty[playerid] = 1;
    Admin[playerid] = Create3DTextLabel("*ServerOwner*",0xF50000FF,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)," ServerOwner %s hat den Admindienst begonnen*",sendername,playerid);
    SendClientMessageToAll(0x2DFF00FF, string);
    SetPlayerArmour(playerid, 100);
    SetPlayerSkin(playerid,279);
    return 1;
    }
    if(PlayerInfo[playerid][pSupporter] >= 3)
    {
    SendClientMessage(playerid,0x41FF00FF,"AdmCmd : Du bist nun als Administrator im Dienst!");
    SetPlayerColor(playerid,BLAU);
    AdminDuty[playerid] = 1;
    Supporter[playerid] = Create3DTextLabel("*Administrator*",0xEBFF00FF,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),"Administrator %s hat den Admindienst begonnen*",sendername,playerid);
    SendClientMessageToAll(0x2DFF00FF, string);
    SetPlayerArmour(playerid, 100);
    SetPlayerSkin(playerid,279);
    return 1;
    }
    }
    if(AdminDuty[playerid] == 1)
    {
    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]);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string,sizeof(string),"AdmCmd : %s hat den Admindienst beendet",sendername,playerid);
    SendClientMessageToAll(0x2DFF00FF, string);
    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;
    }



    Wie kann ich es es einstellen ,dass man wenn man wieder /aduty eingibt und somit aus Adminduty raus geht auch den alten Skin wiederbekommt?


    MfG
    Nicokiller

  • if(AdminDuty[playerid] == 0)
    {
    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]);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string,sizeof(string),"AdmCmd : %s hat den Admindienst beendet",sendername,playerid);
    SendClientMessageToAll(0x2DFF00FF, string);
    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;
    }

  • if(AdminDuty[playerid] == 0) // von 1 auf 0 gesetzt bei dir scheint 1 ja Duty zu sein...
    {
    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]);
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(string,sizeof(string),"AdmCmd : %s hat den Admindienst beendet",sendername,playerid);
    SendClientMessageToAll(0x2DFF00FF, string);
    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;
    }


    Mit dem skin musst einfach nur skin einladen..