Beiträge von James.Spader

    Jeffry


    Danke nochmal das du mir Hilfst :) :)


    Ich kann jetzt jedoch die befehle nicht :/


    Spoiler anzeigen

    public OnPlayerCommandText(playerid, cmdtext[])
    {
    new cmd[128], idx, string[128];
    #if defined CARSELL
    new tmp[128];
    #endif
    cmd = strtok(cmdtext, idx);

    Spoiler anzeigen
    if(strcmp(cmd, "/fahrzeughelp", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    SendClientMessage(playerid, COLOR_WHITE, "{006600}====================== {FFFFFF}Fahrzeugbefehle {006600}======================");
    SendClientMessage(playerid, COLOR_WHITE,"* Fahrzeugbefehle: /parken /flock /freparieren /fverkaufen");
    #if defined CARSELL
    SendClientMessage(playerid, COLOR_WHITE,"* Fahrzeugbefehle: /sfverkaufen /cancelverkauf /acceptverkauf");
    #endif
    }
    return 1;
    }
    if(strcmp(cmd, "/carkey", true) == 0)
    {
    if(MaxVeh[playerid] > 1)
    {
    CarKey[playerid] += 1;
    if(CarKey[playerid] == MaxVeh[playerid])
    {
    CarKey[playerid] = 0;
    }
    if(Carlist[playerid][CarKey[playerid]][Typ] != -1)
    {
    new index = -1;
    for(new i=0; i<sizeof(Kaufliste); i++)
    {
    if(Kaufliste[i][Modelid] == Carlist[playerid][CarKey[playerid]][Typ])
    {
    index = i;
    break;
    }
    }
    if(index == -1) format(string, sizeof(string), "Du nimmst deinen %dten Auto-Schlüssel, für deinen <unbekannt> !", CarKey[playerid]+1);
    else format(string, sizeof(string), "Du nimmst deinen %dten Auto-Schlüssel, für deinen %s !", CarKey[playerid]+1, Kaufliste[index][Name]);
    }
    else
    {
    format(string, sizeof(string), "Du nimmst deinen %dten Auto-Schlüssel !",CarKey[playerid]+1);
    }
    SendClientMessage(playerid,COLOR_YELLOW,string);
    }
    return 1;
    }
    if(strcmp(cmd, "/parken", true) == 0)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    if (IsPlayerInVehicle(playerid,Carlist[playerid][s][Carid]))
    {
    GetVehiclePos(Carlist[playerid][s][Carid],Carlist[playerid][s][X],Carlist[playerid][s][Y],Carlist[playerid][s][Z]);
    GetVehicleZAngle(Carlist[playerid][s][Carid],Carlist[playerid][s][Rotation]);
    SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}» Dein Fahrzeug wurde nun an dieser Position {006600}erfolgreich{FFFFFF} geparkt.");
    }
    else { SendClientMessage(playerid, COLOR_GRAD1, "Du sitzt nicht in deinem eigenen Fahrzeug!"); }
    return 1;
    }
    return 1;
    }
    if(strcmp(cmd, "/freparieren", true) == 0)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    if (Carlist[playerid][s][Typ]!=-1)
    {
    if (Carlist[playerid][s][Status]==0)
    {
    new reparatur = Kaufliste[Carlist[playerid][s][Typ]][Reparatur];
    if (reparatur <= GetPlayerMoney(playerid))
    {
    Carlist[playerid][s][Status]=1;
    Carlist[playerid][s][Carid]=CreateTunedCar(playerid);
    GivePlayerMoney(playerid, - reparatur);
    format(string, 128, "{FFFFFF}» Dein Fahrzeug wurde für {FF0000}$%i{FFFFFF} repariert, das Fahrzeug steht nun an deinen Park-Punkt bereit.", reparatur);
    SendClientMessage(playerid, COLOR_RED, string);
    }
    else { format(string, 128, "Du hast nicht genug Geld für die Reparatur. Du benötigt $%i.", reparatur); SendClientMessage(playerid, COLOR_LIGHTRED, string); }
    }
    else { SendClientMessage(playerid, COLOR_GRAD1, "Dein Fahrzeug benötigt keine Reparatur!"); }
    }
    else
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Du besitzt kein Fahrzeug!");
    }
    return 1;
    }
    }
    if(strcmp(cmd, "/flock", true) == 0)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    if (Carlist[playerid][s][Typ]!=-1)
    {
    if (Carlist[playerid][s][Carid]!=-1)
    {
    if (Carlist[playerid][s][Lock]==0)
    {
    Carlist[playerid][s][Lock]=1;
    SetVehicleParamsForAll(Carlist[playerid][s][Carid],0,1);
    SetVehicleParamsForPlayer(Carlist[playerid][s][Carid],playerid,0,0);
    SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}» Du hast dein Fahrzeug {990000}abgeschlossen{FFFFFF}.");
    }
    else
    {
    Carlist[playerid][s][Lock]=0;
    SetVehicleParamsForAll(Carlist[playerid][s][Carid],0,0);
    SendClientMessage(playerid, COLOR_WHITE, "{FFFFFF}» Du hast dein Fahrzeug {006600}aufgeschlossen{FFFFFF}.");
    }
    }
    else { SendClientMessage(playerid, COLOR_GRAD1, "Du besitzt zur Zeit kein Fahrzeug!"); }
    }
    else { SendClientMessage(playerid, COLOR_GRAD1, "Du besitzt kein Fahrzeug!"); }
    return 1;
    }
    }
    if(strcmp(cmd, "/fverkaufen", true) == 0)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    if (Carlist[playerid][s][Typ]!=-1)
    {
    new preis = (Kaufliste[Carlist[playerid][s][Typ]][Preis]/5)*4;
    if (IsPlayerInVehicle(playerid,Carlist[playerid][s][Carid])) { RemovePlayerFromVehicle(playerid); }
    GivePlayerMoney(playerid, preis);
    DestroyVehicle(Carlist[playerid][s][Carid]);
    Carlist[playerid][s][Typ]=-1; Carlist[playerid][s][X]=0.0; Carlist[playerid][s][Y]=0.0; Carlist[playerid][s][Z]=0.0;
    Carlist[playerid][s][Rotation]=0.0; Carlist[playerid][s][Status]=0; Carlist[playerid][s][Lock]=0; Carlist[playerid][s][Carid]=-1;
    Carlist[playerid][s][Farbe1]=-1; Carlist[playerid][s][Farbe2]=-1; Carlist[playerid][s][mod1]=-1; Carlist[playerid][s][mod2]=-1;
    Carlist[playerid][s][mod3]=-1; Carlist[playerid][s][mod4]=-1; Carlist[playerid][s][mod5]=-1; Carlist[playerid][s][mod6]=-1;
    Carlist[playerid][s][mod7]=-1; Carlist[playerid][s][mod8]=-1; Carlist[playerid][s][mod9]=-1; Carlist[playerid][s][mod10]=-1;
    Carlist[playerid][s][mod11]=-1; Carlist[playerid][s][mod12]=-1; Carlist[playerid][s][mod13]=-1; Carlist[playerid][s][mod14]=-1;
    Carlist[playerid][s][mod15]=-1; Carlist[playerid][s][mod16]=-1; Carlist[playerid][s][mod17]=-1; Carlist[playerid][s][Paintjob]=-1;
    format(string,128,"{FFFFFF}» Du hast {006600}erfolgreich{FFFFFF} dein Fahrzeug für {FF0000}$%i{FFFFFF} verkauft!",preis);
    SendClientMessage(playerid, COLOR_WHITE, string);
    }
    else { SendClientMessage(playerid, COLOR_GRAD1, "Du besitzt kein Fahrzeug!"); }
    return 1;
    }
    }
    #if defined CARSELL
    if(strcmp(cmd, "/sfverkaufen", true) == 0)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    tmp = strtok(cmdtext, idx);
    if (!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Verwendung: /sfverkaufen [PlayerID] [Preis]");
    return 1;
    }
    new sellplayerid = ReturnUser(tmp);
    tmp = strtok(cmdtext, idx);
    if (!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Verwendung: /sfverkaufen [PlayerID] [Geld]");
    return 1;
    }
    new preis = strval(tmp);
    if (preis<0)
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Der Preis muss über $0 liegen.");
    return 1;
    }
    if (Carlist[playerid][s][Typ]==-1)
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Du besitzt kein Auto!");
    return 1;
    }
    if (!IsPlayerConnected(sellplayerid))
    {
    SendClientMessage(playerid, COLOR_GRAD1, "Dieser Spieler ist offline.");
    return 1;
    }
    bietetAn[sellplayerid][0]=playerid;
    bietetAn[sellplayerid][1]=preis;
    new playername[MAX_PLAYER_NAME];
    new sellplayername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    GetPlayerName(sellplayerid,sellplayername,sizeof(sellplayername));
    SendClientMessage(sellplayerid, COLOR_WHITE, " ");
    format(string,128,"* Du bietest den Fahrzeug, {FF0000}%s{FFFF00} für {FF0000}$%i{FFFF00} zum Verkauf an.",sellplayername,preis);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Du kannst das Angebot mit /cancelverkauf zurückziehen.");
    SendClientMessage(sellplayerid, COLOR_WHITE, " ");
    format(string,128,"{FFFF00}* %s bietet dir das Fahrzeug {FF0000}%s{FFFF00} für {FF0000}$%i{FFFF00} zum Verkauf an.",playername,Kaufliste[Carlist[playerid][s][Typ]][Name],preis);
    SendClientMessage(sellplayerid, COLOR_YELLOW, string);
    SendClientMessage(sellplayerid, COLOR_LIGHTBLUE, "* Du kannst das Angebot mit /acceptverkauf annehmen.");
    SendClientMessage(sellplayerid, COLOR_WHITE, " ");
    return 1;
    }
    }
    #endif
    return 0;
    }

    3 = Anzahl die man standardmäßig haben kann. Das ... einfach so lassen.


    Ich bekomme jetzt die meldung das ich schon 1 Fahrzeug besitze.



    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == DIALOG_AUTOKAUFEN)
    {
    if(response == 1)
    {
    new string[128];
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    if (Spectating[playerid][0]!=-1)
    {
    if (Carlist[playerid][s][Typ]==-1)
    {
    new preis = Kaufliste[Spectating[playerid][0]][Preis];
    if(Spectating[playerid][0] == -1)
    {
    //Motorhaube zu
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights1,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
    //Kofferraum zu
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
    //Licht aus
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
    SendClientMessage(playerid, COLOR_GRAD1, "Du besichtigst kein Fahrzeug!");
    TogglePlayerControllable(playerid,1);
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    Spectating[playerid][0]=-1;
    RemovePlayerFromVehicle(playerid);
    }
    else if (preis <= GetPlayerMoney(playerid))
    {
    new autohaus=Kaufliste[Spectating[playerid][0]][Autohaus];
    //Motorhaube zu
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights1,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
    //Kofferraum zu
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
    //Licht aus
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);


    GivePlayerMoney(playerid, - preis);
    Carlist[playerid][s][Typ]=Spectating[playerid][0]; Carlist[playerid][s][X]=Autospawns[autohaus][X]; Carlist[playerid][s][Y]=Autospawns[autohaus][Y];
    Carlist[playerid][s][Z]=Autospawns[autohaus][Z]; Carlist[playerid][s][Rotation]=Autospawns[autohaus][Rotation]; Carlist[playerid][s][Status]=1; Carlist[playerid][s][Lock]=0;
    Carlist[playerid][s][Carid]=CreateVehicle(Kaufliste[Spectating[playerid][0]][Modelid],Carlist[playerid][s][X],Carlist[playerid][s][Y],Carlist[playerid][s][Z],Carlist[playerid][s][Rotation],-1,-1,-1);
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    TogglePlayerControllable(playerid,1);
    Spectating[playerid][0]=-1;
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_WHITE, " ");
    format(string,128,"Du hast dir erfolgreich für $%i das Fahrzeug %s gekauft.",preis,Kaufliste[Carlist[playerid][s][Typ]][Name]);
    SendClientMessage(playerid, COLOR_GREEN, string);
    SendClientMessage(playerid, COLOR_YELLOW, "* Wenn dein Fahrzeug zerstört ist, gib /freparieren ein um es zu reparieren.");
    SendClientMessage(playerid, COLOR_YELLOW, "* Du kannst dein Fahrzeug mit /flock, auf- und abschließen.");
    SendClientMessage(playerid, COLOR_YELLOW, "* Mehr Befehle kannst du unter /fahrzeughelp sehen.");
    SendClientMessage(playerid, COLOR_WHITE, " ");
    SendClientMessage(playerid, COLOR_GREEN, "Dein Fahrzeug steht nun am Ausgabepunkt bereit! Viel Spaß mit dein neuen Fahrzeug");
    SendClientMessage(playerid, COLOR_WHITE, " ");
    SendClientMessage(playerid, COLOR_GREEN, "Fahr Vorsichtig!");
    SendClientMessage(playerid, COLOR_WHITE, " ");
    }
    else
    {
    //Motorhaube zu
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights1,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
    //Kofferraum zu
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
    //Licht aus
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);


    format(string, 128, "Du hast nicht keine $%i um das Fahrzeug zu kaufen.", preis); SendClientMessage(playerid, COLOR_GRAD1, string);
    TogglePlayerControllable(playerid,1);
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    Spectating[playerid][0]=-1;
    RemovePlayerFromVehicle(playerid);
    }
    return 1;
    }
    else
    {
    //Motorhaube zu
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights1,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
    //Kofferraum zu
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
    //Licht aus
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);


    SendClientMessage(playerid, COLOR_GRAD1, "Du besitzt bereits ein Auto!");
    TogglePlayerControllable(playerid,1);
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    Spectating[playerid][0]=-1;
    RemovePlayerFromVehicle(playerid);
    }
    }
    }
    }
    if(response == 0)
    {
    //Motorhaube zu
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights1,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
    //Kofferraum zu
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
    //Licht aus
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
    SendClientMessage(playerid,COLOR_GRAD1,"Du hast den Fahrzeugkauf beendet.");
    TogglePlayerControllable(playerid,1);
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    Spectating[playerid][0]=-1;
    RemovePlayerFromVehicle(playerid);
    return 1;
    }
    }
    return 1;
    }

    Danke :)


    Jedoch funktioniert der Befehl /carkey nicht:



    if(strcmp(cmd, "/carkey", true) == 0)
    {
    if(MaxVeh[playerid] > 1)
    {
    CarKey[playerid] += 1;
    if(CarKey[playerid] == MaxVeh[playerid])
    {
    CarKey[playerid] = 0;
    }
    if(Carlist[playerid][CarKey[playerid]][Typ] != -1)
    {
    new index = -1;
    for(new i=0; i<sizeof(Kaufliste); i++)
    {
    if(Kaufliste[i][Modelid] == Carlist[playerid][CarKey[playerid]][Typ])
    {
    index = i;
    break;
    }
    }
    if(index == -1) format(string, sizeof(string), "Du nimmst deinen %dten Auto-Schlüssel, für deinen <unbekannt> !", CarKey[playerid]+1);
    else format(string, sizeof(string), "Du nimmst deinen %dten Auto-Schlüssel, für deinen %s !", CarKey[playerid]+1, Kaufliste[index][Name]);
    }
    else
    {
    format(string, sizeof(string), "Du nimmst deinen %dten Auto-Schlüssel !",CarKey[playerid]+1);
    }
    SendClientMessage(playerid,COLOR_YELLOW,string);
    }
    return 1;
    }


    Zudem kommt eine Meldung, das ich nur 1 Fahrzeug besitzen kann.



    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == DIALOG_AUTOKAUFEN)
    {
    if(response == 1)
    {
    new string[128];
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    if (Spectating[playerid][0]!=-1)
    {
    if (Carlist[playerid][s][Typ]==-1)
    {
    new preis = Kaufliste[Spectating[playerid][0]][Preis];
    if(Spectating[playerid][0] == -1)
    {
    //Motorhaube zu
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights1,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
    //Kofferraum zu
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
    //Licht aus
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
    SendClientMessage(playerid, COLOR_GRAD1, "Du besichtigst kein Fahrzeug!");
    TogglePlayerControllable(playerid,1);
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    Spectating[playerid][0]=-1;
    RemovePlayerFromVehicle(playerid);
    }
    else if (preis <= GetPlayerMoney(playerid))
    {
    new autohaus=Kaufliste[Spectating[playerid][0]][Autohaus];
    //Motorhaube zu
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights1,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
    //Kofferraum zu
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
    //Licht aus
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);


    GivePlayerMoney(playerid, - preis);
    Carlist[playerid][s][Typ]=Spectating[playerid][0]; Carlist[playerid][s][X]=Autospawns[autohaus][X]; Carlist[playerid][s][Y]=Autospawns[autohaus][Y];
    Carlist[playerid][s][Z]=Autospawns[autohaus][Z]; Carlist[playerid][s][Rotation]=Autospawns[autohaus][Rotation]; Carlist[playerid][s][Status]=1; Carlist[playerid][s][Lock]=0;
    Carlist[playerid][s][Carid]=CreateVehicle(Kaufliste[Spectating[playerid][0]][Modelid],Carlist[playerid][s][X],Carlist[playerid][s][Y],Carlist[playerid][s][Z],Carlist[playerid][s][Rotation],-1,-1,-1);
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    TogglePlayerControllable(playerid,1);
    Spectating[playerid][0]=-1;
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, COLOR_WHITE, " ");
    format(string,128,"Du hast dir erfolgreich für $%i das Fahrzeug %s gekauft.",preis,Kaufliste[Carlist[playerid][s][Typ]][Name]);
    SendClientMessage(playerid, COLOR_GREEN, string);
    SendClientMessage(playerid, COLOR_YELLOW, "* Wenn dein Fahrzeug zerstört ist, gib /freparieren ein um es zu reparieren.");
    SendClientMessage(playerid, COLOR_YELLOW, "* Du kannst dein Fahrzeug mit /flock, auf- und abschließen.");
    SendClientMessage(playerid, COLOR_YELLOW, "* Mehr Befehle kannst du unter /fahrzeughelp sehen.");
    SendClientMessage(playerid, COLOR_WHITE, " ");
    SendClientMessage(playerid, COLOR_GREEN, "Dein Fahrzeug steht nun am Ausgabepunkt bereit! Viel Spaß mit dein neuen Fahrzeug");
    SendClientMessage(playerid, COLOR_WHITE, " ");
    SendClientMessage(playerid, COLOR_GREEN, "Fahr Vorsichtig!");
    SendClientMessage(playerid, COLOR_WHITE, " ");
    }
    else
    {
    //Motorhaube zu
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights1,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
    //Kofferraum zu
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
    //Licht aus
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);


    format(string, 128, "Du hast nicht keine $%i um das Fahrzeug zu kaufen.", preis); SendClientMessage(playerid, COLOR_GRAD1, string);
    TogglePlayerControllable(playerid,1);
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    Spectating[playerid][0]=-1;
    RemovePlayerFromVehicle(playerid);
    }
    return 1;
    }
    else
    {
    //Motorhaube zu
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights1,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
    //Kofferraum zu
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
    //Licht aus
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);


    SendClientMessage(playerid, COLOR_GRAD1, "Du besitzt bereits ein Auto!");
    TogglePlayerControllable(playerid,1);
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    Spectating[playerid][0]=-1;
    RemovePlayerFromVehicle(playerid);
    }
    }
    }
    }
    if(response == 0)
    {
    //Motorhaube zu
    new vid = GetPlayerVehicleID(playerid);
    new engine,lights1,alarm,doors,bonnet,boot,objective;
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
    //Kofferraum zu
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
    //Licht aus
    GetVehicleParamsEx(vid,engine,lights1,alarm,doors,bonnet,boot,objective);
    SetVehicleParamsEx(vid,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
    SendClientMessage(playerid,COLOR_GRAD1,"Du hast den Fahrzeugkauf beendet.");
    TogglePlayerControllable(playerid,1);
    SetVehicleParamsForAll(Kaufliste[Spectating[playerid][0]][Carid],0,0);
    Spectating[playerid][0]=-1;
    RemovePlayerFromVehicle(playerid);
    return 1;
    }
    }
    return 1;
    }


    Jeffry

    Jeffry


    Bekomme Warnings:


    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1060) : warning 219: local variable "s" shadows a variable at a preceding level
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1095) : warning 219: local variable "s" shadows a variable at a preceding level
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1110) : warning 219: local variable "s" shadows a variable at a preceding level
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1161) : warning 209: function "CreateTunedCar" should return a value
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1173) : warning 209: function "DelayDestroyCar" should return a value
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    5 Warnings.



    Die Zeilen:

    Spoiler anzeigen
    [pwn=1053]
    public OnVehicleMod(playerid,vehicleid,componentid)
    {
    new s, pid, check;
    check = GetPlayerFromCarlistCar(vehicleid, pid, s);
    if(playerid != pid || check == -1) return 1;
    if(playerid!=-1)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    new mod=GetModType(componentid);
    switch (mod)
    {
    case 1: { Carlist[playerid][s][mod1]=componentid; }
    case 2: { Carlist[playerid][s][mod2]=componentid; }
    case 3: { Carlist[playerid][s][mod3]=componentid; }
    case 4: { Carlist[playerid][s][mod4]=componentid; }
    case 5: { Carlist[playerid][s][mod5]=componentid; }
    case 6: { Carlist[playerid][s][mod6]=componentid; }
    case 7: { Carlist[playerid][s][mod7]=componentid; }
    case 8: { Carlist[playerid][s][mod8]=componentid; }
    case 9: { Carlist[playerid][s][mod9]=componentid; }
    case 10: { Carlist[playerid][s][mod10]=componentid; }
    case 11: { Carlist[playerid][s][mod11]=componentid; }
    case 12: { Carlist[playerid][s][mod12]=componentid; }
    case 13: { Carlist[playerid][s][mod13]=componentid; }
    case 14: { Carlist[playerid][s][mod14]=componentid; }
    case 15: { Carlist[playerid][s][mod15]=componentid; }
    case 16: { Carlist[playerid][s][mod16]=componentid; }
    case 17: { Carlist[playerid][s][mod17]=componentid; }
    default: { new string[128]; format(string,128,"Unbekannte Komponentenid: %i",componentid); print(string); }
    }
    }
    }
    return 1;
    }
    [/pwn]

    Spoiler anzeigen
    [pwn=1089]
    public OnVehiclePaintjob(playerid,vehicleid, paintjobid)
    {
    new s, pid, check;
    check = GetPlayerFromCarlistCar(vehicleid, pid, s);
    if(playerid != pid || check == -1) return 1;
    if(playerid!=-1)
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    {
    Carlist[playerid][s][Paintjob]=paintjobid;
    }
    }
    return 1;
    }
    [/pwn]

    Spoiler anzeigen
    [pwn=1104]
    public OnVehicleRespray(playerid,vehicleid, color1, color2)
    {
    new s, pid, check;
    check = GetPlayerFromCarlistCar(vehicleid, pid, s);
    if(playerid != pid || check == -1) return 1;
    if(playerid!=-1)
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    {
    Carlist[playerid][s][Farbe1]=color1;
    Carlist[playerid][s][Farbe2]=color2;
    }
    }
    return 1;
    }
    [/pwn]

    Spoiler anzeigen
    [pwn=1126]
    public CreateTunedCar(playerid)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    if(IsPlayerConnected(playerid) && Carlist[playerid][s][Typ]!=-1)
    {
    new carid=CreateVehicle(Kaufliste[Carlist[playerid][s][Typ]][Modelid],Carlist[playerid][s][X],Carlist[playerid][s][Y],Carlist[playerid][s][Z],Carlist[playerid][s][Rotation],-1,-1,-1);
    if(Carlist[playerid][s][Lock]==1)
    {
    SetVehicleParamsForAll(carid,0,1);
    SetVehicleParamsForPlayer(carid,playerid,0,0);
    }
    if(Carlist[playerid][s][mod1]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod1]); }
    if(Carlist[playerid][s][mod2]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod2]); }
    if(Carlist[playerid][s][mod3]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod3]); }
    if(Carlist[playerid][s][mod4]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod4]); }
    if(Carlist[playerid][s][mod5]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod5]); }
    if(Carlist[playerid][s][mod6]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod6]); }
    if(Carlist[playerid][s][mod7]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod7]); }
    if(Carlist[playerid][s][mod8]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod8]); }
    if(Carlist[playerid][s][mod9]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod9]); }
    if(Carlist[playerid][s][mod10]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod10]); }
    if(Carlist[playerid][s][mod11]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod11]); }
    if(Carlist[playerid][s][mod12]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod12]); }
    if(Carlist[playerid][s][mod13]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod13]); }
    if(Carlist[playerid][s][mod14]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod14]); }
    if(Carlist[playerid][s][mod15]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod15]); }
    if(Carlist[playerid][s][mod16]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod16]); }
    if(Carlist[playerid][s][mod17]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod17]); }
    if(Carlist[playerid][s][Paintjob]!=-1) { ChangeVehiclePaintjob(carid,Carlist[playerid][s][Paintjob]); }
    if(Carlist[playerid][s][Farbe1]!=-1) { ChangeVehicleColor(carid,Carlist[playerid][s][Farbe1],Carlist[playerid][s][Farbe2]); }
    return carid;
    }
    return -1;
    }
    }
    [/pwn]

    Spoiler anzeigen
    [pwn=1163]
    public DelayDestroyCar(playerid)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    SetVehicleParamsForAll(Carlist[playerid][s][Carid],0,0);
    DestroyVehicle(Carlist[playerid][s][Carid]);
    Carlist[playerid][s][Status]=0;
    Carlist[playerid][s][Carid]=-1;
    return 1;
    }
    }
    [/pwn]

    Bekomme immer noch Warnings und Errors:


    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1060) : warning 219: local variable "s" shadows a variable at a preceding level
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1095) : warning 219: local variable "s" shadows a variable at a preceding level
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1110) : warning 219: local variable "s" shadows a variable at a preceding level
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1161) : warning 209: function "CreateTunedCar" should return a value
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1173) : warning 209: function "DelayDestroyCar" should return a value
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1183) : error 091: ambiguous constant; tag override is required (symbol "Carid")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.


    [pwn=1175]
    public DelaySetVehicleParams(playerid)
    {
    if(!IsPlayerConnected(playerid)) { return 0; }
    new i;
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    for(i=0; i<MAX_PLAYERS; i++)
    {
    if(Carlist[i][s][Carid]!=-1 && Carlist[i][s][Lock]==1) { SetVehicleParamsForPlayer(Carlist[i][Carid],playerid,0,1); }
    if(Spectating[i][0]!=-1) { SetVehicleParamsForPlayer(Kaufliste[Spectating[i][0]][Carid],playerid,0,1); }
    }
    }
    return 1;
    }
    [/pwn]


    Jeffry

    Ich habe eben j anstatt s verwendet.


    So, ich habe es jetzt so gemacht:



    GetPlayerFromCarlistCar(carid, &pid, &slot)
    {
    for(new i=0; i<sizeof(Carlist); i++)
    {
    for(new s=0; s<sizeof(Carlist[]); s++)
    {
    if(Carlist[i][s][Carid]==carid)
    {
    pid = i;
    slot = s;
    return 1;
    }
    }
    }
    return -1;
    }



    Ich bekomme jedoch nun 1 Error und warnings.


    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1055) : warning 202: number of arguments does not match definition
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1055) : warning 202: number of arguments does not match definition
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1089) : warning 202: number of arguments does not match definition
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1089) : warning 202: number of arguments does not match definition
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1102) : warning 202: number of arguments does not match definition
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1102) : warning 202: number of arguments does not match definition
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1155) : warning 209: function "CreateTunedCar" should return a value
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1167) : warning 209: function "DelayDestroyCar" should return a value
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(1177) : error 091: ambiguous constant; tag override is required (symbol "Carid")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    1 Error.


    Die Zeilen:


    Spoiler anzeigen
    [pwn=1053]
    public OnVehicleMod(playerid,vehicleid,componentid)
    {
    if (playerid!=GetPlayerFromCarlistCar(vehicleid)) {return 1;}
    if(playerid!=-1)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    new mod=GetModType(componentid);
    switch (mod)
    {
    case 1: { Carlist[playerid][s][mod1]=componentid; }
    case 2: { Carlist[playerid][s][mod2]=componentid; }
    case 3: { Carlist[playerid][s][mod3]=componentid; }
    case 4: { Carlist[playerid][s][mod4]=componentid; }
    case 5: { Carlist[playerid][s][mod5]=componentid; }
    case 6: { Carlist[playerid][s][mod6]=componentid; }
    case 7: { Carlist[playerid][s][mod7]=componentid; }
    case 8: { Carlist[playerid][s][mod8]=componentid; }
    case 9: { Carlist[playerid][s][mod9]=componentid; }
    case 10: { Carlist[playerid][s][mod10]=componentid; }
    case 11: { Carlist[playerid][s][mod11]=componentid; }
    case 12: { Carlist[playerid][s][mod12]=componentid; }
    case 13: { Carlist[playerid][s][mod13]=componentid; }
    case 14: { Carlist[playerid][s][mod14]=componentid; }
    case 15: { Carlist[playerid][s][mod15]=componentid; }
    case 16: { Carlist[playerid][s][mod16]=componentid; }
    case 17: { Carlist[playerid][s][mod17]=componentid; }
    default: { new string[128]; format(string,128,"Unbekannte Komponentenid: %i",componentid); print(string); }
    }
    }
    }
    return 1;
    }[/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]
    [/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]public OnVehiclePaintjob(playerid,vehicleid, paintjobid)
    {
    if (playerid!=GetPlayerFromCarlistCar(vehicleid)) {return 1;}
    if(playerid!=-1)
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    {
    Carlist[playerid][s][Paintjob]=paintjobid;
    }
    }
    return 1;
    }[/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]
    [/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]public OnVehicleRespray(playerid,vehicleid, color1, color2)
    {
    if (playerid!=GetPlayerFromCarlistCar(vehicleid)) {return 1;}
    if(playerid!=-1)
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    {
    Carlist[playerid][s][Farbe1]=color1;
    Carlist[playerid][s][Farbe2]=color2;
    }
    }
    return 1;
    }[/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]
    [/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]public SetVehicleParamsForAll(carid,objective,doorslocked)
    {
    new i;
    for(i=0; i<MAX_PLAYERS; i++) { SetVehicleParamsForPlayer(carid,i,objective,doorslocked); }
    }[/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]
    [/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]public CreateTunedCar(playerid)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    if(IsPlayerConnected(playerid) && Carlist[playerid][s][Typ]!=-1)
    {
    new carid=CreateVehicle(Kaufliste[Carlist[playerid][s][Typ]][Modelid],Carlist[playerid][s][X],Carlist[playerid][s][Y],Carlist[playerid][s][Z],Carlist[playerid][s][Rotation],-1,-1,-1);
    if(Carlist[playerid][s][Lock]==1)
    {
    SetVehicleParamsForAll(carid,0,1);
    SetVehicleParamsForPlayer(carid,playerid,0,0);
    }
    if(Carlist[playerid][s][mod1]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod1]); }
    if(Carlist[playerid][s][mod2]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod2]); }
    if(Carlist[playerid][s][mod3]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod3]); }
    if(Carlist[playerid][s][mod4]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod4]); }
    if(Carlist[playerid][s][mod5]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod5]); }
    if(Carlist[playerid][s][mod6]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod6]); }
    if(Carlist[playerid][s][mod7]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod7]); }
    if(Carlist[playerid][s][mod8]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod8]); }
    if(Carlist[playerid][s][mod9]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod9]); }
    if(Carlist[playerid][s][mod10]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod10]); }
    if(Carlist[playerid][s][mod11]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod11]); }
    if(Carlist[playerid][s][mod12]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod12]); }
    if(Carlist[playerid][s][mod13]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod13]); }
    if(Carlist[playerid][s][mod14]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod14]); }
    if(Carlist[playerid][s][mod15]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod15]); }
    if(Carlist[playerid][s][mod16]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod16]); }
    if(Carlist[playerid][s][mod17]!=-1) { AddVehicleComponent(carid,Carlist[playerid][s][mod17]); }
    if(Carlist[playerid][s][Paintjob]!=-1) { ChangeVehiclePaintjob(carid,Carlist[playerid][s][Paintjob]); }
    if(Carlist[playerid][s][Farbe1]!=-1) { ChangeVehicleColor(carid,Carlist[playerid][s][Farbe1],Carlist[playerid][s][Farbe2]); }
    return carid;
    }
    return -1;
    }
    }[/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]
    [/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]public DelayDestroyCar(playerid)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    SetVehicleParamsForAll(Carlist[playerid][s][Carid],0,0);
    DestroyVehicle(Carlist[playerid][s][Carid]);
    Carlist[playerid][s][Status]=0;
    Carlist[playerid][s][Carid]=-1;
    return 1;
    }
    }[/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]
    [/expander] [/expander] [/expander]

    Spoiler anzeigen
    [expander][expander][expander]public DelaySetVehicleParams(playerid)
    {
    if(!IsPlayerConnected(playerid)) { return 0; }
    new i;
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    for(i=0; i<MAX_PLAYERS; i++)
    {
    if(Carlist[i][s][Carid]!=-1 && Carlist[i][s][Lock]==1) { SetVehicleParamsForPlayer(Carlist[i][Carid],playerid,0,1); }
    if(Spectating[i][0]!=-1) { SetVehicleParamsForPlayer(Kaufliste[Spectating[i][0]][Carid],playerid,0,1); }
    }
    }
    return 1;
    }
    [/pwn][/expander] [/expander] [/expander]

    Ich bekomme hier errors:



    GetPlayerFromCarlistCar(carid, &pid, &slot)
    {
    for(new i=0; i<sizeof(Carlist); i++)
    {
    for(new j=0; j<sizeof(Carlist[]); j++)
    {
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    if(Carlist[i][s][j][Carid]==carid)
    {
    pid = i;
    slot = j;
    return 1;
    }
    }
    }
    }
    return -1;
    }


    Errors:


    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(510) : warning 213: tag mismatch
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(510) : error 001: expected token: ")", but found "["
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(510) : error 029: invalid expression, assumed zero
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(510) : error 091: ambiguous constant; tag override is required (symbol "Carid")
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(510) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.

    Jeffry


    Ich bekomme hier 4 Errors:


    [pwn=831]
    if(strcmp(cmd, "/carkey", true) == 0)
    {
    if(MaxVeh[playerid] > 1)
    {
    CarKey[playerid] += 1;
    if(CarKey[playerid] == MaxVeh[playerid])
    {
    CarKey[playerid] = 0;
    }
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)
    {
    if(Carlist[playerid][s][CarKey[playerid]][Typ] != -1)
    {
    new index = -1;
    for(new i=0; i<sizeof(Kaufliste); i++)
    {
    if(Kaufliste[i][Modelid] == Carlist[playerid][s][CarKey[playerid]][Typ])
    {
    index = i;
    break;
    }
    }
    if(index == -1) format(string, sizeof(string), "Du nimmst deinen %dten Auto-Schlüssel, für deinen <unbekannt> !", CarKey[playerid]+1);
    else format(string, sizeof(string), "Du nimmst deinen %dten Auto-Schlüssel, für deinen %s !", CarKey[playerid]+1, Kaufliste[index][Name]);
    }
    else
    {
    format(string, sizeof(string), "Du nimmst deinen %dten Auto-Schlüssel !",CarKey[playerid]+1);
    }
    SendClientMessage(playerid,COLOR_YELLOW,string);
    }
    }
    return 1;
    }
    [/pwn]



    Errors:


    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(842) : warning 213: tag mismatch
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(842) : error 001: expected token: ")", but found "["
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(842) : error 029: invalid expression, assumed zero
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(842) : warning 215: expression has no effect
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(842) : error 001: expected token: ";", but found "]"
    C:\SA-MP Server\filterscripts\AutohausSystem.pwn(842) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.

    Jeffry


    Muss ich jetzt auch bei


    public OnVehicleDeath(vehicleid, killerid)
    {
    new i;
    for(i=0; i<MAX_PLAYERS; i++)
    {
    if(Carlist[i][s][Carid]==vehicleid)
    {
    SetTimerEx("DelayDestroyCar",3000,0,"i",i);
    return 1;
    }
    }
    return 1;
    }


    die schleife einfügen?
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++)

    Ja. Alles.


    Ich habe es hier eingefügt:


    public OnPlayerConnect(playerid)
    {
    new dateiname[MAX_PLAYER_NAME+25];
    new playername[MAX_PLAYER_NAME+25];
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Typ]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][X]=0.0; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Y]=0.0; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Z]=0.0;
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Rotation]=0.0; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Status]=0; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Lock]=0; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Carid]=-1;
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Farbe1]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Farbe2]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod1]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod2]=-1;
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod3]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod4]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod5]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod6]=-1;
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod7]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod8]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod9]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod10]=-1;
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod11]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod12]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod13]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod14]=-1;
    for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod15]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod16]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][mod17]=-1; for(new s=0; s<MAX_CARS_PER_PLAYER; s++) Carlist[playerid][s][Paintjob]=-1;
    Spectating[playerid][0]=-1;
    #if defined CARSELL
    bietetAn[playerid]={-1,0};
    #endif
    GetPlayerName(playerid, playername, sizeof(playername));
    format(dateiname, sizeof(dateiname), "/GekaufteFahrzeuge/%s.car", playername);
    if (fexist(dateiname))
    {
    new File: CarFile = fopen(dateiname, io_read);
    if ( CarFile )
    {
    new key[ 256 ];
    new Data[ 256 ];
    while ( fread( CarFile , Data , sizeof( Data ) ) )
    {
    key = ini_GetKey(Data);
    if(strcmp(key,"AH_Typ",true)==0) { Carlist[playerid][s][Typ]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_X",true)==0) { Carlist[playerid][s][X]=floatstr(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Y",true)==0) { Carlist[playerid][s][Y]=floatstr(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Z",true)==0) { Carlist[playerid][s][Z]=floatstr(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Rot",true)==0) { Carlist[playerid][s][Rotation]=floatstr(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Status",true)==0) { Carlist[playerid][s][Status]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Lock",true)==0) { Carlist[playerid][s][Lock]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Paintjob",true)==0) { Carlist[playerid][s][Paintjob]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Farbe1",true)==0) { Carlist[playerid][s][Farbe1]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_Farbe2",true)==0) { Carlist[playerid][s][Farbe2]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod1",true)==0) { Carlist[playerid][s][mod1]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod2",true)==0) { Carlist[playerid][s][mod2]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod3",true)==0) { Carlist[playerid][s][mod3]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod4",true)==0) { Carlist[playerid][s][mod4]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod5",true)==0) { Carlist[playerid][s][mod5]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod6",true)==0) { Carlist[playerid][s][mod6]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod7",true)==0) { Carlist[playerid][s][mod7]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod8",true)==0) { Carlist[playerid][s][mod8]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod9",true)==0) { Carlist[playerid][s][mod9]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod10",true)==0) { Carlist[playerid][s][mod10]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod11",true)==0) { Carlist[playerid][s][mod11]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod12",true)==0) { Carlist[playerid][s][mod12]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod13",true)==0) { Carlist[playerid][s][mod13]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod14",true)==0) { Carlist[playerid][s][mod14]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod15",true)==0) { Carlist[playerid][s][mod15]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod16",true)==0) { Carlist[playerid][s][mod16]=strval(ini_GetValue(Data)); }
    else if(strcmp(key,"AH_mod17",true)==0) { Carlist[playerid][s][mod17]=strval(ini_GetValue(Data)); }
    }
    }
    fclose(CarFile);
    if(Carlist[playerid][s][Typ]!=-1 && Carlist[playerid][s][Status]==1)
    {
    Carlist[playerid][s][Carid]=CreateTunedCar(playerid);
    }
    }
    SetTimerEx("DelaySetVehicleParams",10000,0,"i",playerid);
    return 1;
    }


    Ich bekomme jetzt Errors das s noch nicht definet ist



    Jeffry

    Schwachsinn, Windows erkennt die Plugins ganz ohne der Endung .dll .

    mhh, bei mir nicht, aber ok. Wenn bei mir im Plugins Ordner z.b. 123.so und ich dies in der server.cfg einfüge unter plugins wird es bei mir nicht geladen. (also ohne .so am ende in der datei)