Beiträge von Mesut

    if (strcmp("/gate", cmdtext, true, 10) == 0)
    {
    new getpname[24];
    GetPlayerName(playerid, getpname, 24);
    if(strcmp(getpname, "Mesut", true))
    return SendClientMessage(playerid,ROT,"Du kannst das nicht");
    if(!IsPlayerInRangeOfPoint(playerid,10,-856.60, 2720.95, 48.13))
    return SendClientMessage(playerid,ROT, "Du bist nicht am Tor!");
    MoveObject(Tor,-856.60, 2720.95, 48.13-10,2.0);
    SetTimer("GateClosetGate",5000,0);
    SendClientMessage(playerid,ROT,"Tor geöffnet! Es schließt automatsich in 5 Sek.");
    return 1;
    }

    dcmd_cc(playerid, params[])
    {
    #pragma unused params
    if(SpielerInfo[playerid][pAdmin]>=1)
    {
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed," ");
    SendClientMessageToAll(cRed,"Der Chat wurde von einen Admin gecleart");
    }
    else
    {
    SendClientMessage(playerid,cRed,"Diesen Befehl kannst du nicht nutzen. Mindestens benötigter Rang: {00FF5A}Supporter");
    }
    return 1;
    }


    Wenn ich sowas sehe, tun mir die Augen weh! Davon sind im Script haufenweise..:rolleyes:
    Wieso hast Du keine Zählschleife benutzt?

    Spoiler anzeigen
    In o_cmd mal eine Lösung für dich..ocmd:cc(playerid,params[])
    {
    if(!GetPVarInt(playerid,"pAdmin"))return 1;
    for(new i; i<MAX_PLAYERS; i++)SendClientMessageToAll(cRed, " ");
    SendClientMessageToAll(cRed, "Der Chat wurde von einen Admin gecleart");
    return 1;
    }

    • Ist es Quatsch nachdem SendClientMessage einen return zu setzen.
    • Du musst natürlich mit einer geschleiften Klammer den Befehl schließen.
    • Dazu ist der Ausdruck ! bei der Abfrage völlig falsch.

    Hier (!) geht kürzer.
    ocmd:tor(playerid,params[])
    {
    #pragma unused params
    if(!GetPVarInt(playerid,"pAdmin"))return 1; //wird einfach mit return 1; abgeschlossen.
    if(!IsPlayerInRangeOfPoint(playerid,5,661.40002441406, -1228.0999755859, 17.5))return SendClientMessage(playerid,ROT,"Du bist nicht nahe genung am Tor!");
    MoveObject(admin,661.40002441406, -1228.0999755859, 17.5-10,2);
    SetTimer("pdtortimer",10000,0);
    SendClientMessage(playerid,ROT,"Das Tor wird sich nach 10 Sekunden automatisch schließen!");
    return 1;
    }