Beiträge von Boszor

    könntest du mir da mal was tipseln zur veranschaulichung ?


    Also so in der Art nen kleines tutorial ?


    Suchfunktion schon benutzt, jedoch ist in der Suchfunktion nix zu diesem Thema zu finden leider =(


    //Edit Tutorialfrage eingefügt
    //edit Suchfunktion

    Hallo wie bekomme ich es hin, dass wenn ich zum beispiel in einem Busbot sitze, das wenn ich schreibe "Busfritze" Das der NPC zurück sagt, hey nenn mich nicht busfritze

    Zeile (27447) : Array-Index fehlt (bspw. Array[1], Name: "adsperre")
    Zeile (27521) : Wahrscheinlich unabsichtliche Zuordnung [Beispiel: if(variable
    Zeile (27521) : Array-Index fehlt (bspw. Array[1], Name: "adsperre")
    Zeile (27521) : Leerer Befehl (bspw. ;;)
    Zeile (27552) : Wahrscheinlich unabsichtliche Zuordnung [Beispiel: if(variable
    Zeile (27552) : Array-Index fehlt (bspw. Array[1], Name: "adsperre")
    Zeile (27552) : Leerer Befehl (bspw. ;;)


    27447
    if(adsperre == 1)


    27521
    if adsperre = 0;


    27552
    if adsperre = 1;


    Habe ich definiert


    new adsperre [MAX_PLAYERS];


    //Edit Zeilen noch angehängt
    //edit Definierung eingefügt

    Hmmm.... immer noch das gleiche ^^


    Zeile (27447) : error 012: invalid function call, not a valid address
    Zeile (27447) : Befehl hat keinen Sinn
    Zeile (27447) : Erwartete Zeichen ";", aber gefunden ")"
    Zeile (27447) : Ungültiger Befehl
    Zeile (27447) : Zuviele Fehler in einer Zeile


    if(adsperre(playerid) == 1)
    {
    SendClientMessage(playerid,COLOR_WHITE," Du darfst keine Werbung schreiben da diese Funktion für dich gesperrt wurde.");
    return 1;
    }

    Klammer bringt leider nix



    Zeile (27447) : error 012: invalid function call, not a valid address
    Zeile (27447) : Befehl hat keinen Sinn
    Zeile (27447) : Erwartete Zeichen ";", aber gefunden ")"
    Zeile (27447) : Ungültiger Befehl
    Zeile (27447) : Zuviele Fehler in einer Zeile


    if(adsperre(playerid) == 1))
    {
    SendClientMessage(playerid,COLOR_WHITE," Du darfst keine Werbung schreiben da diese Funktion für dich gesperrt wurde.")
    return 1;
    }


    und auch das Zeichen ; bringt nix

    Jetzt bekomme ich errors


    Zeile (27447) : error 012: invalid function call, not a valid address
    Zeile (27447) : Befehl hat keinen Sinn
    Zeile (27447) : Erwartete Zeichen ";", aber gefunden ")"
    Zeile (27447) : Ungültiger Befehl
    Zeile (27447) : Zuviele Fehler in einer Zeile


    Bei der Zeile


    if(adsperre(playerid) == 1)
    {
    SendClientMessage(playerid,COLOR_WHITE," Du darfst keine Werbung schreiben da diese Funktion für dich gesperrt wurde.")
    return 1;
    }

    Also in dermaßen so ?


    if(strcmp(cmd,"/lockad",true)==0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pAdmin] < 2) { return 1; }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "/lockad [Playerid]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid) && (giveplayerid != INVALID_PLAYER_ID))
    {
    if adsperre = 0;
    {
    adsperre [giveplayerid]=1;
    SendClientMessage(playerid,COLOR_GREY,"/ad wurde für diesen Spieler gespeert!");
    format(string, 256, "AdmCmd: %s hat den /ad für %s gespeert!",sendername, giveplayer);
    ABroadCast(COLOR_RED,string,1);
    SendClientMessage(giveplayerid,COLOR_YELLOW,"Der Befehl /ad wurde für dich gespeert!");
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler ist nicht Aktiv!");
    return 1;
    }
    }
    return 1;
    }


    if(strcmp(cmd,"/unlockad",true)==0)
    {
    if(IsPlayerConnected(playerid))
    {
    if(PlayerInfo[playerid][pAdmin] < 2) { return 1; }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "/lockad [Playerid]");
    return 1;
    }
    giveplayerid = ReturnUser(tmp);
    if(IsPlayerConnected(giveplayerid) && (giveplayerid != INVALID_PLAYER_ID))
    {
    if adsperre = 1;
    {
    adsperre [giveplayerid]=0;
    SendClientMessage(playerid,COLOR_GREY,"/ad wurde für diesen Spieler freigeschaltet!");
    format(string, 256, "AdmCmd: %s hat den /ad für %s wieder freigegeben!",sendername, giveplayer);
    ABroadCast(COLOR_RED,string,1);
    SendClientMessage(giveplayerid,COLOR_YELLOW,"Der Befehl /ad wurde für dich wieder freigegeben!");
    }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, "Dieser Spieler ist nicht Aktiv!");
    return 1;
    }
    }
    return 1;
    }



    Jetzt mein Problem, wo gebe ich das hier ein also ein Speertext ?


    if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)
    {
    if(PlayerInfo[playerid][pLevel] > 1)
    {
    if(IsPlayerConnected(playerid))
    {
    if(gPlayerLogged[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist noch nicht eingeloggt !");
    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: (/ad)vertise [text]");
    return 1;
    }
    if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
    {
    format(string, sizeof(string), "Bitte Versuch es Später wieder %d sekunden zwischen einer Advertisement !", (addtimer/1000));
    SendClientMessage(playerid, COLOR_GRAD2, string);
    return 1;


    }
    new payout = idx * 5;
    if(GetPlayerMoney(playerid) < payout)
    {
    format(string, sizeof(string), "* Du hast %d characters benutzt das kostet $%d, du hast nicht genug.", offset, payout);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    return 1;
    }
    GivePlayerMoney(playerid, - payout);
    SBizzInfo[7][sbTill] += payout;
    ExtortionSBiz(7, payout);
    format(string, sizeof(string), "Werbung: %s, Von: %s PH: %d", result, sendername,PlayerInfo[playerid][pPnumber]);
    OOCNews(TEAM_GROVE_COLOR,string);
    format(string, sizeof(string), "~r~Abzug $%d~n~~w~Nachricht hat: %d Characters erreicht", payout, idx);
    GameTextForPlayer(playerid, string, 5000, 5);
    if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
    }
    }
    else SendClientMessage(playerid,COLOR_RED,"Du brauchst Level 2 um eine /ad zu schreiben.");
    return 1;
    }

    Sry hatte ich ganz vergessen xD


    Ich gebe dann nun mal ebend /ad


    if(strcmp(cmd, "/advertise", true) == 0 || strcmp(cmd, "/ad", true) == 0)
    {
    if(PlayerInfo[playerid][pLevel] > 1)
    {
    if(IsPlayerConnected(playerid))
    {
    if(gPlayerLogged[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_GREY, " Du bist noch nicht eingeloggt !");
    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: (/ad)vertise [text]");
    return 1;
    }
    if ((!adds) && (PlayerInfo[playerid][pAdmin] < 1))
    {
    format(string, sizeof(string), "Bitte Versuch es Später wieder %d sekunden zwischen einer Advertisement !", (addtimer/1000));
    SendClientMessage(playerid, COLOR_GRAD2, string);
    return 1;


    }
    new payout = idx * 5;
    if(GetPlayerMoney(playerid) < payout)
    {
    format(string, sizeof(string), "* Du hast %d characters benutzt das kostet $%d, du hast nicht genug.", offset, payout);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    return 1;
    }
    GivePlayerMoney(playerid, - payout);
    SBizzInfo[7][sbTill] += payout;
    ExtortionSBiz(7, payout);
    format(string, sizeof(string), "Werbung: %s, Von: %s PH: %d", result, sendername,PlayerInfo[playerid][pPnumber]);
    OOCNews(TEAM_GROVE_COLOR,string);
    format(string, sizeof(string), "~r~Abzug $%d~n~~w~Nachricht hat: %d Characters erreicht", payout, idx);
    GameTextForPlayer(playerid, string, 5000, 5);
    if (PlayerInfo[playerid][pAdmin] < 1){SetTimer("AddsOn", addtimer, 0);adds = 0;}
    }
    }
    else SendClientMessage(playerid,COLOR_RED,"Du brauchst Level 2 um eine /ad zu schreiben.");
    return 1;
    }


    Diesen Befehl sollten auch nur Admins nutzen können



    Kann mir den jemand helfen, ich sitze jetzt schon ziemlich lange dranne, komme aber nicht auf die Ideee


    /edit Hilfe

    Zitat

    i = Integer


    Also eine Zahl die nur Positiv sein kann (Wie eine Userid)


    MfG.
    Me


    Okay also müsste ich das auch bei jedem Timer einfügen ich danke dir du hast mir ein wenig weitergeholfen und ich habe was dazu gelernt

    Hallo /hack funktioniert wunderbar der Befehl jedoch wird man weder nach 2 min entfreezed noch werden die Wanteds gelöscht was ist hier falsch ?


    forward HACK();


    if(strcmp(cmd, "/hack", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if (!IsACopCar(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid,0xFEFEFEFF,"Du bist nicht in einem Copcar!");
    if(IsACop(playerid) && OnDuty[playerid] == 1)onduty++;
    if(onduty<1)return SendClientMessage(playerid,0x0000FFFF,"Es sind keine 2 Cops Im Dienst!");
    FreezePlayer(playerid);
    SetTimer("HACK", 60000, 0);
    SendClientMessage(playerid,0xFFFF00FF,"Du hackst dich in den Polizeicomputer!");
    SendClientMessage(playerid,0xFFFF00FF,"DU HAST EINEN FEHLER BEGANGEN UND DIE COPS WURDEN ALARMIERT");
    SendClientMessage(playerid,0xFFFF00FF,"ERFOLGREICH EINGEHACKT !");
    TogglePlayerControllable(playerid, 0);
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(IsACop(i) && OnDuty[i] == 1)
    {
    SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Achtung Alle Einheiten! Ein Copcar wurde gehackt!");
    SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Verbrechen: Hacking, Gesuchter: Unbekannt");
    SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Begeben sie sich sofort zum Copcar!");
    SetPlayerCheckpoint(i, X, Y, Z-5, 3.0);
    }
    }
    }
    }
    return 1;
    }




    public HACK(playerid)
    {
    new string[256];
    format(string, sizeof(string), "~g~Hackvorgang Abgeschlossen!");
    SendClientMessage(playerid,0xFF0000FF,"Hackvorgang erfolgreich!");
    SendClientMessage(playerid,0xFF0000FF,"Computer wird heruntergefahren!");
    GameTextForPlayer(playerid, string, 5000, 3);
    WantedPoints[playerid] = 0;
    WantedLevel[playerid] = 0;
    ClearCrime(playerid);
    RemovePlayerFromVehicle(playerid);
    TogglePlayerControllable(playerid, 1);
    return 0;
    }

    Ich denke das mache ich auch nochmal gibt noch vieles dazu zu lernen danke dir Kavkus


    Jedoch bleibt mir noch ein Problem


    Der meinte die (carid) ist eine unbekannte Variable


    Also habe ich es I genannt jedoch immer noch das gleiche


    if(strcmp(cmd, "/hack", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if (!IsACopCar(i)) return SendClientMessage(playerid,0xFEFEFEFF,"Du bist nicht in einem Copcar!");
    if(IsACop(playerid) && OnDuty[playerid] == 1)onduty++;
    if(onduty<1)return SendClientMessage(playerid,0x0000FFFF,"Es sind keine 2 Cops Im Dienst!");
    FreezePlayer(playerid);
    SetTimer("HACK", 60000, 0);
    SendClientMessage(playerid,0xFFFF00FF,"Du hackst dich in den Polizeicomputer!");
    SendClientMessage(playerid,0xFFFF00FF,"DU HAST EINEN FEHLER BEGANGEN UND DIE COPS WURDEN ALARMIERT");
    SendClientMessage(playerid,0xFFFF00FF,"ERFOLGREICH EINGEHACKT !");
    TogglePlayerControllable(playerid, 0);
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(IsACop(i) && OnDuty[i] == 1)
    {
    SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Achtung Alle Einheiten! Ein Copcar wurde gehackt!");
    SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Verbrechen: Hacking, Gesuchter: Unbekannt");
    SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Begeben sie sich sofort zum Copcar!");
    SetPlayerCheckpoint(i, X, Y, Z-5, 3.0);
    }
    }
    }
    }
    return 1;
    }


    Jedoch geht nun gar nix mehr -.-

    Nein bringt leider nix, jetzt stürzt der Pawno ab /blcop


    Hier nochmal der komplette Code


    if(strcmp(cmdtext, "/blcop",true) == 0)
    {
    if(UCL[GetPlayerVehicleID(playerid)] == 0)
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(tmpcar) == 560)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene4[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19292,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.5,0.0,0.85,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    AttachObjectToVehicle(sirene4[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0,0.9,0.4,0,0,0);//Mittig im Fenster
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    else if(GetVehicleModel(tmpcar) == 415)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.4,-0.2,0.65,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    else if(GetVehicleModel(tmpcar) == 451)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.45,-0.3,0.6,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    else if(GetVehicleModel(tmpcar) == 541)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.45,-0.1,0.65,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    else if(GetVehicleModel(tmpcar) == 470)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.6,0.2,1.1,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    else if(GetVehicleModel(tmpcar) == 421)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.4,0.2,0.72,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    else if(GetVehicleModel(tmpcar) == 405)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.4,0,0.78,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    else if(GetVehicleModel(tmpcar) == 426)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.5,0,0.88,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    else if(GetVehicleModel(tmpcar) == 517)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.6,0,0.85,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    else if(GetVehicleModel(tmpcar) == 598)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    else if(GetVehicleModel(tmpcar) == 597)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    else if(GetVehicleModel(tmpcar) == 596)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    else if(GetVehicleModel(tmpcar) == 411)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.44,0.3,0.7,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    else if(GetVehicleModel(tmpcar) == 561)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.4,0.1,0.85,0,0,0);//Dach Beifahrer
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.4,0.1,0.85,0,0,0);//Dach Fahrer
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }
    }
    else if(UCL[GetPlayerVehicleID(playerid)] == 1)
    {
    DestroyObject(sirene[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene1[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene2[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene3[GetPlayerVehicleID(playerid)]);
    DestroyObject(sirene4[GetPlayerVehicleID(playerid)]);
    UCL[GetPlayerVehicleID(playerid)] = 0;
    return 1;
    }
    }






    Jetzt weiß ich gar nix mehr, jetzt stürzt komplett Pawno ab, sobald ich den Befehl rausnehmen, geht es wieder also muss es ja an dem /hack liegen


    if(strcmp(cmd, "/hack", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if (IsACopCar(carid))
    {
    SendClientMessage(playerid,0xFEFEFEFF,"Du bist nicht in einem Copcar!");
    return 1;
    }
    if(IsACop(playerid) && OnDuty[playerid] == 1)onduty++;
    }
    if(onduty<1)return SendClientMessage(playerid,0x0000FFFF,"Es sind keine 2 Cops Im Dienst!");
    }
    FreezePlayer(playerid);
    SetTimer("HACK", 60000, 0);
    SendClientMessage(playerid,0xFFFF00FF,"Du hackst dich in den Polizeicomputer!");
    SendClientMessage(playerid,0xFFFF00FF,"DU HAST EINEN FEHLER BEGANGEN UND DIE COPS WURDEN ALARMIERT");
    SendClientMessage(playerid,0xFFFF00FF,"ERFOLGREICH EINGEHACKT !");
    TogglePlayerControllable(playerid, 0);
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(IsACop(i) && OnDuty[i] == 1)
    {
    SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Achtung Alle Einheiten! Ein Copcar wurde gehackt!");
    SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Verbrechen: Hacking, Gesuchter: Unbekannt");
    SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Begeben sie sich sofort zum Copcar!");
    SetPlayerCheckpoint(i, X, Y, Z-5, 3.0);
    }
    }
    }
    return 1;
    }


    //Edit Frage wegen Absturz hinzugefügt

    Wie bekomme ich hier ne If Anfrage rein, sobald ich es so mache bekomme ich 26 Errors


    if(strcmp(cmdtext, "/ls0", true) == 0)
    {
    if(gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
    {
    if(UCL[GetPlayerVehicleID(playerid)] == 0)
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(tmpcar) == 560)
    {
    sirene[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene1[GetPlayerVehicleID(playerid)] = CreateDynamicObject(18646,0,0,0,0,0,0,100);
    sirene2[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene3[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19288,0,0,0,0,0,0,100);
    sirene4[GetPlayerVehicleID(playerid)] = CreateDynamicObject(19292,0,0,0,0,0,0,100);
    AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
    AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.5,0.0,0.85,0,0,0);//Dach sirene
    AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite
    AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite
    AttachObjectToVehicle(sirene4[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0,0.9,0.4,0,0,0);//Mittig im Fenster
    UCL[GetPlayerVehicleID(playerid)] = 1;
    return 1;
    }


    Würde mich über Hilfe freuen



    Und dann habe ich noch, sobald ich den Befehl eingebe steht"Ich bin nicht im Copcar" oder es sind keine 2 Cops im dienst, jedoch ist dieses der Fall, in Privatwagen jedoch von Usern klappt es aber das ist ja nicht der sinn der Sache =)


    if(strcmp(cmd, "/hack", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if (IsACopCar(carid))
    {
    SendClientMessage(playerid,0xFEFEFEFF,"Du bist nicht in einem Copcar!");
    return 1;
    }
    if(IsACop(playerid) && OnDuty[playerid] == 1)onduty++;
    }
    if(onduty<1)return SendClientMessage(playerid,0x0000FFFF,"Es sind keine 2 Cops Im Dienst!");
    }
    FreezePlayer(playerid);
    SetTimer("HACK", 60000, 0);
    SendClientMessage(playerid,0xFFFF00FF,"Du hackst dich in den Polizeicomputer!");
    SendClientMessage(playerid,0xFFFF00FF,"DU HAST EINEN FEHLER BEGANGEN UND DIE COPS WURDEN ALARMIERT");
    SendClientMessage(playerid,0xFFFF00FF,"ERFOLGREICH EINGEHACKT !");
    TogglePlayerControllable(playerid, 0);
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i))
    {
    if(IsACop(i) && OnDuty[i] == 1)
    {
    SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Achtung Alle Einheiten! Ein Copcar wurde gehackt!");
    SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Verbrechen: Hacking, Gesuchter: Unbekannt");
    SendClientMessage(i,TEAM_BLUE_COLOR,"HQ: Begeben sie sich sofort zum Copcar!");
    SetPlayerCheckpoint(i, X, Y, Z-5, 3.0);
    }
    }
    }
    return 1;
    }


    //Edit ausklammerungen entfernt