| Autohaus - 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
  • Liebe Community,
    Ich habe ein etwas größeres Problem, ich habe nun ein Autohaus-System aber wenn ich ein Fahrzeug kaufen will, kommt "Du besitzt bereits ein Fahrzeug!", aber ich besitze keins. Ich habe auch /fverkaufen (Fahrzeug verkaufen) probiert aber da steht logischer weise, du besitzt kein Fahrzeug... | Ich finde aber leider keinen Fehler, ich habe nur noch ein Autohaus hinzugefügt, davor ging es. Ich hoffe ihr wisst wodran es liegt.


    Die ganzen Zeilen bzw. das Filterscript findet ihr hier: http://pastebin.com/4U8azBut




    Mit freundlichen Grüßen,
    James.

  • Dann müsste es eher so sein:

    Spoiler anzeigen
    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == DIALOG_AUTOKAUFEN)
    {
    if(response == 1)
    {
    new string[128];
    if (Spectating[playerid][0]!=-1)
    {
    if (Carlist[playerid][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);

    Spoiler anzeigen
    GivePlayerMoney(playerid, - preis);
    Carlist[playerid][Typ]=Spectating[playerid][0]; Carlist[playerid][X]=Autospawns[autohaus][X]; Carlist[playerid][Y]=Autospawns[autohaus][Y];
    Carlist[playerid][Z]=Autospawns[autohaus][Z]; Carlist[playerid][Rotation]=Autospawns[autohaus][Rotation]; Carlist[playerid][Status]=1; Carlist[playerid][Lock]=0;
    Carlist[playerid][Carid]=CreateVehicle(Kaufliste[Spectating[playerid][0]][Modelid],Carlist[playerid][X],Carlist[playerid][Y],Carlist[playerid][Z],Carlist[playerid][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][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);

    Spoiler anzeigen
    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);

    Spoiler anzeigen
    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;
    }


    Ich weiß nicht wie deine Standard-Werte sind, aber teste es mal so.

  • Ich weiß nicht wie deine Standard-Werte sind, aber teste es mal so.


    Bekomme nen Error:


    C:\-((() SA-MP ()))-\filterscripts\AutohausSystem.pwn(174) : error 052: multi-dimensional arrays must be fully initialized


    die Zeile:


    [pwn=111]
    new Kaufliste[55][ahModell] = {
    //Luxus Autohaus LS
    {"Washington",0,421,-1,750000,5000,1217.3042,-1656.5707,11.5570,269.5404},
    {"Comet",0,480,-1,700000,8000,1222.5184,-1644.1611,11.6616,221.5530},
    {"Sultan",0,560,-1,680000,4000,1218.9382,-1670.8591,11.6018,314.0943},
    {"Huntley",0,579,-1,180000,6900,1231.0923,-1672.6888,11.6253,34.2381},
    {"Sentinel",0,405,-1,500000,8200,1240.9736,-1667.8677,11.5946,56.1857},
    //Motorrdladen
    {"Mountain Bike",1,510,-1,500,1,2117.8926,-1122.4998,24.9426,253.4156},
    {"Mountain Bike",1,510,-1,500,1,2117.6650,-1123.8425,24.9137,253.5880},
    {"Mountain Bike",1,510,-1,500,1,2117.4771,-1125.2086,24.8876,257.0994},
    {"Mofa",1,462,-1,600,50,2117.2161,-1139.6852,24.6589,286.8279},
    {"Mofa",1,462,-1,600,50,2116.9707,-1138.1912,24.7018,286.0222},
    {"Mofa",1,462,-1,600,50,2116.9517,-1141.3840,24.5857,272.0475},
    {"Wayfarer",1,586,-1,1500,900,2118.1821,-1130.0509,24.7861,269.2923},
    {"Wayfarer",1,586,-1,1500,900,2118.2397,-1132.3002,24.7687,265.5937},
    {"Wayfarer",1,586,-1,1500,900,2118.1287,-1134.3275,24.7397,257.8215},
    {"Quad",1,471,-1,3000,1700,2117.9827,-1151.6768,23.6705,329.0428},
    {"Quad",1,471,-1,3000,1700,2123.6401,-1152.2770,23.4905,51.7651},
    {"Sanchez",1,468,-1,7000,5700,2136.7642,-1146.0504,24.3672,77.5922},
    {"Sanchez",1,468,-1,7000,5700,2136.4177,-1148.6737,24.0645,51.0294},
    {"PCJ-600",1,461,-1,2500,3700,2137.1233,-1126.3420,25.0929,88.3136},
    {"PCJ-600",1,461,-1,2500,3700,2136.9434,-1128.2639,25.1692,90.8003},
    {"Freeway",1,463,-1,4500,1700,2137.5095,-1132.1301,25.2318,90.4568},
    {"Freeway",1,463,-1,4500,1700,2137.4978,-1134.4463,25.2427,92.8347},
    {"NRG-900",1,522,-1,500000,70000,2137.3223,-1139.0424,25.0414,89.7367},
    {"NRG-900",1,522,-1,500000,70000,2137.4568,-1140.8300,24.8463,93.7557},
    //Billig Autohaus
    {"Premier",1,426,-1,18000,9000,1560.0846, -2264.1414, 13.2597, 89.6213},
    {"Landstalker",1,400,-1,11000,5500,1560.0846, -2260.8613, 13.2597, 89.6213},
    {"Bravura",1,401,-1,14000,7000,1560.0846, -2257.5415, 13.2597, 89.6213},
    {"Perenniel",1,404,-1,16000,8000,1560.0846, -2254.2615, 13.2597, 89.6213},
    {"Manana",1,410,-1,8000,4000,1560.0846, -2250.7815, 13.2597, 89.6213},
    {"Voodoo",1,412,-1,5000,2500,1560.0846, -2247.7615, 13.2597, 89.6213},
    {"Moonbeam",1,418,-1,20000,10000,1560.0846, -2244.5815, 13.2597, 89.6213},
    {"Bobcat",1,422,-1,7000,3500,1560.0846, -2241.3215, 13.2597, 89.6213},
    {"Stallion",1,439,-1,18000,9000,1560.0846, -2237.9414, 13.2597, 89.6213},
    {"Solair",1,458,-1,13000,6500,1560.0846, -2234.6216, 13.2597, 89.6213},
    {"Glendale",1,466,-1,18000,9000,1556.2112, -2211.9893, 13.2805, 180.1945},
    {"Oceanic",1,467,-1,19000,12000,1552.7112, -2211.9893, 13.2805, 180.1945},
    {"Hermes",1,474,-1,27000,23000,1549.5511, -2211.9893, 13.2805, 180.1945},
    {"Sabre",1,475,-1,3000,1000,1546.2913, -2211.9893, 13.2805, 180.1945},
    {"Walton",1,478,-1,500,250,1543.0912, -2211.9893, 13.2805, 180.1945},
    {"Burrito",1,482,-1,18000,9000,1539.6711, -2211.9893, 13.2805, 180.1945},//
    {"Camper",1,483,-1,32000,18000,1536.4312, -2211.9893, 13.2805, 180.1945},
    {"Rancher",1,489,-1,18000,9000,1533.1312, -2211.9893, 13.2805, 180.1945},
    {"Virgo",1,491,-1,8000,1000,1529.7312, -2211.9893, 13.2805, 180.1945},
    {"Greenwood",1,492,-1,31000,9000,1526.6512, -2211.9893, 13.2805, 180.1945},
    {"Blista Compact",1,496,-1,1000,500,1521.8912, -2211.9893, 13.2805, 180.1945},
    {"Mesa",1,500,-1,7000,3500,1518.6912, -2211.9893, 13.2805, 180.1945},
    {"Elegant",1,507,-1,18000,9000,1515.4512, -2211.9893, 13.2805, 180.1945},//
    {"Fortune",1,526,-1,12000,6000,1512.1711, -2211.9893, 13.2805, 180.1945},
    {"Cadrona",1,426,-1,11000,5500,1508.7913, -2211.9893, 13.2805, 180.1945},
    {"Willard",1,529,-1,18000,9000,1505.5511, -2211.9893, 13.2805, 180.1945},
    {"Slamvan",1,535,-1,19000,9000,1502.2312, -2211.9893, 13.2805, 180.1945},
    {"Blade",1,536,-1,6000,1000,1498.9512, -2211.9893, 13.2805, 180.1945},
    {"Primo",1,547,-1,18000,9000,1495.7112, -2211.9893, 13.2805, 180.1945},
    {"Stafford",1,580,-1,37000,21000,1492.4712, -2211.9893, 13.2805, 180.1945}
    //Hier kannst du die Fahrzeuge erstellen Preis Name Spawn usw ist eigentlich
    //Ganz leicht. Sollte ich mehr Zeit haben mach ich noch nen Boot / FLugzeug
    //Und ein Billig Autohaus mit rein natürlich auch /carkey Zurzeit gibt es
    //Nur ein Motorradladen und ein Luxus Laden jeder Spieler kann bis jetzt
    //Nur Maximal 1 Car besitzen wird noch geändert mfg ronny.
    }; // <--------- Error
    [/pwn]

  • Kannst du das enum bitte auch dazu posten? Das "ahModell" enum.



    Jo, hier sind mal die 3 enum noch davor ^^:
    [pwn=49]
    enum ahCar
    {
    Typ,
    Float:X,
    Float:Y,
    Float:Z,
    Float:Rotation,
    Status,
    Lock,
    Carid,
    Paintjob,
    Farbe1,
    Farbe2,
    mod1,
    mod2,
    mod3,
    mod4,
    mod5,
    mod6,
    mod7,
    mod8,
    mod9,
    mod10,
    mod11,
    mod12,
    mod13,
    mod14,
    mod15,
    mod16,
    mod17
    };
    new Carlist[MAX_PLAYERS][ahCar];


    enum ahSpawn
    {
    Float:X,
    Float:Y,
    Float:Z,
    Float:Rotation
    };
    new Autospawns[3][ahSpawn] = {
    {1275.6895,-1655.1228,13.5469,270.9359},//Luxus Autohaus
    {2149.1116,-1133.8927,25.5678,266.4449},//Motorradladen
    {1542.3469,-2267.0911,13.3430,180.0524}//Billig Autohaus
    //Hier könnt ihr noch weitere Autohäuser hinbauen!
    //Also diese Cords bedeuten wo das Fahrzeug nach dem Kaufen Spawnen soll.
    };


    enum ahModell
    {
    Name[128],
    Autohaus,
    Modelid,
    Carid,
    Preis,
    Reparatur,
    Float:X,
    Float:Y,
    Float:Z,
    Float:Rotation
    };
    [/pwn]

  • das geht auch, falls du kein sizeof(Kaufliste) verwendest.


    Ich habe nur noch das Problem, wenn ich mir ein Fahrzeug im Billig Autohaus kaufe, steht es nicht an den ausgabepunkt.


    die zeilen:



    new Autospawns[3][ahSpawn] = {
    {1275.6895,-1655.1228,13.5469,270.9359},//Luxus Autohaus
    {2149.1116,-1133.8927,25.5678,266.4449},//Motorradladen
    {1542.3469,-2267.0911,13.3430,180.0524}//Billig Autohaus <-----
    //Hier könnt ihr noch weitere Autohäuser hinbauen!
    //Also diese Cords bedeuten wo das Fahrzeug nach dem Kaufen Spawnen soll.
    };

  • Wie sieht der Code aus, mit dem du das kaufst?


    Das war der dialog:

    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid == DIALOG_AUTOKAUFEN)
    {
    if(response == 1)
    {
    new string[128];
    if (Spectating[playerid][0]!=-1)
    {
    if (Carlist[playerid][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][Typ]=Spectating[playerid][0]; Carlist[playerid][X]=Autospawns[autohaus][X]; Carlist[playerid][Y]=Autospawns[autohaus][Y];
    Carlist[playerid][Z]=Autospawns[autohaus][Z]; Carlist[playerid][Rotation]=Autospawns[autohaus][Rotation]; Carlist[playerid][Status]=1; Carlist[playerid][Lock]=0;
    Carlist[playerid][Carid]=CreateVehicle(Kaufliste[Spectating[playerid][0]][Modelid],Carlist[playerid][X],Carlist[playerid][Y],Carlist[playerid][Z],Carlist[playerid][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][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;
    }

  • Ahh, ok.
    Du musst in der Kaufliste nach dem Namen der Fahrzeuge die 1 zu 2 ändern.


    Also:
    {"Premier",1,426,-1,18000,9000,1560.0846, -2264.1414, 13.2597, 89.6213},
    zu
    {"Premier",2,426,-1,18000,9000,1560.0846, -2264.1414, 13.2597, 89.6213},


    Und das für alle Autos, die am billigen Autohaus sein sollen.

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen