Admin Label-Problem

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, da stürzt PAWNO immer ab xD


    if(strcmp(cmd, "/label", true) == 0)
    {
    if (PlayerInfo[playerid][pAdmin] == 0)
    SendClientMessage(playerid, COLOR_RED,"Du bist kein Admin!");
    }
    else if (PlayerInfo[playerid][pAdmin] == 1)
    new Text3D:mod = Create3DTextLabel("Moderator",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(mod, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] == 2)
    {
    new Text3D:smod = Create3DTextLabel("Super Moderator",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(smod, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] == 3)
    {
    new Text3D:admin = Create3DTextLabel("Administrator",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(admin, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] == 4)
    {
    new Text3D:sadmin = Create3DTextLabel("Super Administrator",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(sadmin, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] == 1337)
    {
    new Text3D:coleader = Create3DTextLabel("Co-Projektleitung",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(coleader, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] => 1338)
    {
    new Text3D:projektleiter = Create3DTextLabel("Projektleitung",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(projektleiter, playerid, 0.0, 0.0, 0.0);
    }
    return 1;
    }

    Die deutsche Rechtschreibung ist Freeware, sprich du darfst sie kostenlos nutzen...
    Sie ist aber nicht Open Source, somit darfst du sie nicht verändern oder in veränderter Form veröffentlichen!


    Einmal editiert, zuletzt von Hijashy ()

  • Du hattest/hast viele Klammerfehler drin..
    Ich weiß nicht ob es so funktioniert :thumbup:


    if(strcmp(cmd, "/label", true) == 0)
    {
    if (PlayerInfo[playerid][pAdmin] == 0)
    SendClientMessage(playerid, COLOR_RED,"Du bist kein Admin!");
    }
    else if (PlayerInfo[playerid][pAdmin] == 1)
    {
    new Text3D:mod = Create3DTextLabel("Moderator",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(mod, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] == 2)
    {
    new Text3D:smod = Create3DTextLabel("Super Moderator",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(smod, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] == 3)
    {
    new Text3D:admin = Create3DTextLabel("Administrator",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(admin, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] == 4)
    {
    new Text3D:sadmin = Create3DTextLabel("Super Administrator",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(sadmin, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] == 1337)
    {
    new Text3D:coleader = Create3DTextLabel("Co-Projektleitung",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(coleader, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] => 1338)
    {
    new Text3D:projektleiter = Create3DTextLabel("Projektleitung",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(projektleiter, playerid, 0.0, 0.0, 0.0);
    return 1;
    }

  • if(strcmp(cmd, "/label", true) == 0)
    {
    if (PlayerInfo[playerid][pAdmin] == 0)
    SendClientMessage(playerid, COLOR_RED,"Du bist kein Admin!");
    }//Was macht diese Klammer? Wieso ist das if-Statement an sich in eine Klammer gesetzt worden? Ist das richtig so? Glaub nicht
    else if (PlayerInfo[playerid][pAdmin] == 1)
    {
    new Text3D:mod = Create3DTextLabel("Moderator",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(mod, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] == 2)
    {
    new Text3D:smod = Create3DTextLabel("Super Moderator",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(smod, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] == 3)
    {
    new Text3D:admin = Create3DTextLabel("Administrator",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(admin, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] == 4)
    {
    new Text3D:sadmin = Create3DTextLabel("Super Administrator",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(sadmin, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] == 1337)
    {
    new Text3D:coleader = Create3DTextLabel("Co-Projektleitung",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(coleader, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] => 1338)
    {
    new Text3D:projektleiter = Create3DTextLabel("Projektleitung",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(projektleiter, playerid, 0.0, 0.0, 0.0);
    return 1;
    }

  • if(strcmp(cmd, "/label", true) == 0)
    {
    if (PlayerInfo[playerid][pAdmin] == 0)
    {
    SendClientMessage(playerid, COLOR_RED,"Du bist kein Admin!");
    }
    else if (PlayerInfo[playerid][pAdmin] == 1)
    {
    new Text3D:mod = Create3DTextLabel("Moderator",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(mod, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] == 2)
    {
    new Text3D:smod = Create3DTextLabel("Super Moderator",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(smod, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] == 3)
    {
    new Text3D:admin = Create3DTextLabel("Administrator",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(admin, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] == 4)
    {
    new Text3D:sadmin = Create3DTextLabel("Super Administrator",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(sadmin, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] == 1337)
    {
    new Text3D:coleader = Create3DTextLabel("Co-Projektleitung",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(coleader, playerid, 0.0, 0.0, 0.0);
    }
    else if (PlayerInfo[playerid][pAdmin] => 1338)
    {
    new Text3D:projektleiter = Create3DTextLabel("Projektleitung",COLOR_GREEN,30.0,30.0,5.0,30.0,0);
    Attach3DTextLabelToPlayer(projektleiter, playerid, 0.0, 0.0, 0.0);
    }
    return 1;
    }
    So müsstes gehen.