Neon System Speicherung/Abruf

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hey. Ich hatte gestern bereits ein Problem gehabt, wo bei mir Sirene/Neon nicht ging.
    Kaum ist das "gefixt" kommt ein neues "Problem"


    Ich will , dass das Neon gespeichert wird. Am besten schon in der Vorhandenen AUTO-Datei vom Spieler.


    Aber, wenn ichs versuche einzustellen, bekomme ich "milliarden" von Error und Warnings... Bekomme diese auch erst weg, wenn ich die Sachen weder entferne.


    Nun frage ich erstmal :
    Welche "Lines" braucht ihr ? (btw es ist ein Godfather Edit... )
    Also welchen Teil?
    Da ich es in den Auto-Datein haben möcht, wahrscheinlich die Abschnitte wo zum Beispiel das CarModel etc gespeichert wird von diesem Spieler.
    Würde mich um Hilfe freuen (Bin auch nur ein FreizeiScripter)


    Gerne auch (Wenn das jemand anbietet) per Teamviewer :)


    Paar Codeschnipsel die mit den Auto-Datein der Spieler zutun haben
    enum dtc_PlayerCar
    {
    CarId,
    CarOwner[MAX_PLAYER_NAME],
    CarModel,
    Float:CarPos_x,
    Float:CarPos_y,
    Float:CarPos_z,
    Float:CarRotate,
    CarNitro,
    CarHyd,
    CarWheel,
    CarAusp,
    CarSideL,
    CarSideR,
    CarFB,
    CarRB,
    CarSpoiler,
    CarRoof,
    CarHood,
    CarVents,
    CarLamps,
    CarPJ,
    CarC1,
    CarC2,
    CarPreis,
    CarArrest,
    Plate[15],
    };


    Function CarTuning(playerid,slot)
    {
    ChangeVehicleColor(PlayerCar[playerid][slot][CarId],PlayerCar[playerid][slot][CarC1],PlayerCar[playerid][slot][CarC2]);
    if(PlayerCar[playerid][slot][CarPJ] >= 0) {ChangeVehiclePaintjob(PlayerCar[playerid][slot][CarId],PlayerCar[playerid][slot][CarPJ]);}
    if(PlayerCar[playerid][slot][CarNitro] != 0) {AddVehicleComponent(PlayerCar[playerid][slot][CarId],PlayerCar[playerid][slot][CarNitro]);}
    if(PlayerCar[playerid][slot][CarHyd] != 0) {AddVehicleComponent(PlayerCar[playerid][slot][CarId],PlayerCar[playerid][slot][CarHyd]);}
    if(PlayerCar[playerid][slot][CarWheel] != 0) {AddVehicleComponent(PlayerCar[playerid][slot][CarId],PlayerCar[playerid][slot][CarWheel]);}
    if(PlayerCar[playerid][slot][CarAusp] != 0) {AddVehicleComponent(PlayerCar[playerid][slot][CarId],PlayerCar[playerid][slot][CarAusp]);}
    if(PlayerCar[playerid][slot][CarSideL] != 0) {AddVehicleComponent(PlayerCar[playerid][slot][CarId],PlayerCar[playerid][slot][CarSideL]);}
    if(PlayerCar[playerid][slot][CarSideR] != 0) {AddVehicleComponent(PlayerCar[playerid][slot][CarId],PlayerCar[playerid][slot][CarSideR]);}
    if(PlayerCar[playerid][slot][CarFB] != 0) {AddVehicleComponent(PlayerCar[playerid][slot][CarId],PlayerCar[playerid][slot][CarFB]);}
    if(PlayerCar[playerid][slot][CarRB] != 0) {AddVehicleComponent(PlayerCar[playerid][slot][CarId],PlayerCar[playerid][slot][CarRB]);}
    if(PlayerCar[playerid][slot][CarSpoiler] != 0) {AddVehicleComponent(PlayerCar[playerid][slot][CarId],PlayerCar[playerid][slot][CarSpoiler]);}
    if(PlayerCar[playerid][slot][CarRoof] != 0) {AddVehicleComponent(PlayerCar[playerid][slot][CarId],PlayerCar[playerid][slot][CarRoof]);}
    if(PlayerCar[playerid][slot][CarHood] != 0) {AddVehicleComponent(PlayerCar[playerid][slot][CarId],PlayerCar[playerid][slot][CarHood]);}
    if(PlayerCar[playerid][slot][CarVents] != 0) {AddVehicleComponent(PlayerCar[playerid][slot][CarId],PlayerCar[playerid][slot][CarVents]);}
    if(PlayerCar[playerid][slot][CarLamps] != 0) {AddVehicleComponent(PlayerCar[playerid][slot][CarId],PlayerCar[playerid][slot][CarLamps]);}
    if(Dtc_LockOnSpawn)
    {
    Dtc_Carlock[PlayerCar[playerid][slot][CarId]] = 1;
    Dtc_LockCar(PlayerCar[playerid][slot][CarId]);
    }
    }


    Function OnPlayerBuyCar(playerid,Model,Preis,Autohaus)//CARSYS
    {
    if(IsPlayerConnected(playerid) && !Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]])
    {
    CallRemoteFunction("M_GivePlayerMoney","id",playerid,-Preis);
    if(Autohaus == 2) //Billig Autohaus
    {
    SBizzInfo[1][sbTill] += Preis/4; //Billig Autohaus
    }
    if(Autohaus == 3) // luxus
    {
    SBizzInfo[0][sbTill] += Preis/4; // luxus
    }
    /*if(Autohaus == 7) // VIP-Autohaus
    {
    SBizzInfo[2][sbTill] += Preis/10; // VIP-Autohaus
    }*/
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Du hast dir ein Auto gekauft.");


    SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Gehe zu der KFZ Stelle und hole dir ein Kennzeichen.");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Fahre vorsichtig..Und denk an die StraßenVerkehrsOrdnung!");
    SendClientMessage(playerid,COLOR_GRAD2,"Navigation gesetzt!");
    SetParkPlatz(playerid,Autohaus);
    new name[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, name, sizeof name);
    format(str, sizeof str, "/Autos/%s%d.dtcar", name,Dtc_PlayerKey[playerid]);
    new File: hFile = fopen(str, io_write);
    if (hFile)
    {
    new var[32];
    format(var, 32, "CarId=0\n");fwrite(hFile, var);
    format(var, 32, "CarModel=%d\n",Model);fwrite(hFile, var);
    format(var, 32, "CarPos_x=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_x]);fwrite(hFile, var);
    format(var, 32, "CarPos_y=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_y]);fwrite(hFile, var);
    format(var, 32, "CarPos_z=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_z]);fwrite(hFile, var);
    format(var, 32, "CarRotate=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarRotate]);fwrite(hFile, var);
    format(var, 32, "CarNitro=0\n");fwrite(hFile, var);
    format(var, 32, "CarHyd=0\n");fwrite(hFile, var);
    format(var, 32, "CarWheel=0\n");fwrite(hFile, var);
    format(var, 32, "CarAusp=0\n");fwrite(hFile, var);
    format(var, 32, "CarSideL=0\n");fwrite(hFile, var);
    format(var, 32, "CarSideR=0\n");fwrite(hFile, var);
    format(var, 32, "CarFB=0\n");fwrite(hFile, var);
    format(var, 32, "CarRB=0\n");fwrite(hFile, var);
    format(var, 32, "CarSpoiler=0\n");fwrite(hFile, var);
    format(var, 32, "CarRoof=0\n");fwrite(hFile, var);
    format(var, 32, "CarHood=0\n");fwrite(hFile, var);
    format(var, 32, "CarVents=0\n");fwrite(hFile, var);
    format(var, 32, "CarLamps=0\n");fwrite(hFile, var);
    format(var, 32, "CarPJ=-1\n");fwrite(hFile, var);
    format(var, 32, "CarC1=-1\n");fwrite(hFile, var);
    format(var, 32, "CarC2=-1\n");fwrite(hFile, var);
    format(var, 32, "Preis=%d\n",Preis);fwrite(hFile, var);
    format(var, 32, "CarArrest=0\n");fwrite(hFile, var);
    format(var, 32, "Plate=[GDG]\n");fwrite(hFile, var);
    fclose(hFile);
    }
    OnPlayerCarLogin(playerid);
    }
    }


    Function OnPlayerCarLogin(playerid)
    {
    for(new x = 0; x < MaxVeh; x++)
    {
    if(!Dtc_PlayerHaveCar[playerid][x])
    {
    new string2[128];
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    format(string2, sizeof(string2), "/Autos/%s%d.dtcar", playername2,x);
    new File: UserFile = fopen(string2, io_read);
    if (UserFile)
    {
    Dtc_PlayerHaveCar[playerid][x] = 1;
    new key[ 256 ] , val[ 256 ];
    new Data[ 256 ];
    while ( fread( UserFile , Data , sizeof( Data ) ) )
    {
    key = ini_GetKey( Data );
    if( strcmp( key , "CarId" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarId] = strval( val ); }
    if( strcmp( key , "CarModel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarModel] = strval( val ); }
    if( strcmp( key , "CarPos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_x] = floatstr( val ); }
    if( strcmp( key , "CarPos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_y] = floatstr( val ); }
    if( strcmp( key , "CarPos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_z] = floatstr( val ); }
    if( strcmp( key , "CarRotate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRotate] = floatstr( val ); }
    if( strcmp( key , "CarNitro" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarNitro] = strval( val ); }
    if( strcmp( key , "CarHyd" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarHyd] = strval( val ); }
    if( strcmp( key , "CarWheel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarWheel] = strval( val ); }
    if( strcmp( key , "CarAusp" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarAusp] = strval( val ); }
    if( strcmp( key , "CarSideL" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSideL] = strval( val ); }
    if( strcmp( key , "CarSideR" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSideR] = strval( val ); }
    if( strcmp( key , "CarFB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarFB] = strval( val ); }
    if( strcmp( key , "CarRB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRB] = strval( val ); }
    if( strcmp( key , "CarSpoiler" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSpoiler] = strval( val ); }
    if( strcmp( key , "CarRoof" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRoof] = strval( val ); }
    if( strcmp( key , "CarHood" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarHood] = strval( val ); }
    if( strcmp( key , "CarVents" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarVents] = strval( val ); }
    if( strcmp( key , "CarLamps" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarLamps] = strval( val ); }
    if( strcmp( key , "CarPJ" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPJ] = strval( val ); }
    if( strcmp( key , "CarC1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarC1] = strval( val ); }
    if( strcmp( key , "CarC2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarC2] = strval( val ); }
    if( strcmp( key , "Preis" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPreis] = strval( val ); }
    if( strcmp( key , "CarArrest" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarArrest] = strval( val ); }
    if( strcmp( key , "Plate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][Plate] = strval( val ); }
    }
    fclose(UserFile);
    PlayerCarSpawn(playerid,x);
    }
    }
    }
    }


    Function PlayerCarSpawn(playerid,Slot)
    {
    if(IsPlayerConnected(playerid))
    {
    if(Dtc_PlayerHaveCar[playerid][Slot])
    {
    PlayerCar[playerid][Slot][CarId] = CreateVehicle(PlayerCar[playerid][Slot][CarModel],PlayerCar[playerid][Slot][CarPos_x],PlayerCar[playerid][Slot][CarPos_y],PlayerCar[playerid][Slot][CarPos_z],PlayerCar[playerid][Slot][CarRotate],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2], 60000);/*vehicle spawn*/
    ChangeVehicleColor(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2]);
    if(PlayerCar[playerid][Slot][CarPJ] >= 0) {ChangeVehiclePaintjob(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarPJ]);}
    if(PlayerCar[playerid][Slot][CarNitro] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarNitro]);}
    if(PlayerCar[playerid][Slot][CarHyd] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarHyd]);}
    if(PlayerCar[playerid][Slot][CarWheel] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarWheel]);}
    if(PlayerCar[playerid][Slot][CarAusp] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarAusp]);}
    if(PlayerCar[playerid][Slot][CarSideL] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSideL]);}
    if(PlayerCar[playerid][Slot][CarSideR] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSideR]);}
    if(PlayerCar[playerid][Slot][CarFB] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarFB]);}
    if(PlayerCar[playerid][Slot][CarRB] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarRB]);}
    if(PlayerCar[playerid][Slot][CarSpoiler] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarSpoiler]);}
    if(PlayerCar[playerid][Slot][CarRoof] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarRoof]);}
    if(PlayerCar[playerid][Slot][CarHood] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarHood]);}
    if(PlayerCar[playerid][Slot][CarVents] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarVents]);}
    if(PlayerCar[playerid][Slot][CarLamps] != 0) {AddVehicleComponent(PlayerCar[playerid][Slot][CarId],PlayerCar[playerid][Slot][CarLamps]);}
    if(Dtc_LockOnSpawn)
    {
    Dtc_Carlock[PlayerCar[playerid][Slot][CarId]] = 1;
    Dtc_LockCar(PlayerCar[playerid][Slot][CarId]);
    }
    new strings[15];
    new name[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, name, sizeof name);
    format(str, sizeof str, "/Autos/%s%d.dtcar", name,Dtc_PlayerKey[playerid]);
    //format(strings, sizeof(strings), "%s", dini_Get(str, "CarPlate"));
    format(strings, sizeof(strings), "%s", dini_Get(str, "Plate"));
    SetVehicleNumberPlate(PlayerCar[playerid][Slot][CarId], strings);
    SetVehicleToRespawn(PlayerCar[playerid][Slot][CarId]);
    for(new x = 0; x < MaxVeh; x++)
    {
    PlayerCar[playerid][x][Plate] = strings;
    }
    }
    }
    }


    Function OnVehicleMod(playerid,vehicleid,componentid)
    {
    FRAC_OnVehicleMod(playerid, vehicleid, componentid);
    for(new x = 0; x < MaxVeh; x++)
    {
    if (vehicleid == PlayerCar[playerid][x][CarId] && Dtc_PlayerHaveCar[playerid][x])
    {
    if((componentid >= 1008) && (componentid <= 1010)) {PlayerCar[playerid][x][CarNitro] = componentid;}
    if((componentid >= 1142) && (componentid <= 1145)) {PlayerCar[playerid][x][CarVents] = componentid;}
    if((componentid == 1013) || (componentid == 1024)) {PlayerCar[playerid][x][CarLamps] = componentid;}
    if((componentid >= 1004) && (componentid <= 1005)||(componentid >= 1011) && (componentid <= 1012)) {PlayerCar[playerid][x][CarHood] = componentid;}
    if(componentid == 1087) {PlayerCar[playerid][x][CarHyd] = componentid;}
    if(componentid == 1086) {PlayerCar[playerid][x][CarHyd] = componentid;}
    if(IsAWheel(componentid)) {PlayerCar[playerid][x][CarWheel] = componentid;}
    if(IsAExhaust(componentid)) {PlayerCar[playerid][x][CarAusp] = componentid;}
    if(IsASideL(componentid)) {PlayerCar[playerid][x][CarSideL] = componentid; PlayerCar[playerid][x][CarSideR] = SideR;}
    if(IsASideR(componentid)) {PlayerCar[playerid][x][CarSideR] = componentid; PlayerCar[playerid][x][CarSideL] = SideL;}
    if(IsAFB(componentid)) {PlayerCar[playerid][x][CarFB] = componentid;}
    if(IsARB(componentid)) {PlayerCar[playerid][x][CarRB] = componentid;}
    if(IsASpoiler(componentid)) {PlayerCar[playerid][x][CarSpoiler] = componentid;}
    if(IsARoof(componentid)) {PlayerCar[playerid][x][CarRoof] = componentid;}
    }
    }
    return 1;
    }


    Function OnPlayerCarUpdate(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    for(new x = 0; x < MaxVeh; x++)
    {
    if(Dtc_PlayerHaveCar[playerid][x])
    {
    DestroyVehicle(PlayerCar[playerid][x][CarId]);
    Dtc_Carlock[PlayerCar[playerid][x][CarId]] = 0;
    Dtc_LockCar(PlayerCar[playerid][x][CarId]);
    new string3[128];
    new playername3[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername3, sizeof(playername3));
    format(string3, sizeof(string3), "/Autos/%s%d.dtcar", playername3,x);
    new File: hFile = fopen(string3, io_write);
    if (hFile)
    {
    new var[32];
    format(var, 32, "CarId=%d\n",PlayerCar[playerid][x][CarId]);fwrite(hFile, var);
    format(var, 32, "CarModel=%d\n",PlayerCar[playerid][x][CarModel]);fwrite(hFile, var);
    format(var, 32, "CarPos_x=%.3f\n",PlayerCar[playerid][x][CarPos_x]);fwrite(hFile, var);
    format(var, 32, "CarPos_y=%.3f\n",PlayerCar[playerid][x][CarPos_y]);fwrite(hFile, var);
    format(var, 32, "CarPos_z=%.3f\n",PlayerCar[playerid][x][CarPos_z]);fwrite(hFile, var);
    format(var, 32, "CarRotate=%.3f\n",PlayerCar[playerid][x][CarRotate]);fwrite(hFile, var);
    format(var, 32, "CarNitro=%d\n",PlayerCar[playerid][x][CarNitro]);fwrite(hFile, var);
    format(var, 32, "CarHyd=%d\n",PlayerCar[playerid][x][CarHyd]);fwrite(hFile, var);
    format(var, 32, "CarWheel=%d\n",PlayerCar[playerid][x][CarWheel]);fwrite(hFile, var);
    format(var, 32, "CarAusp=%d\n",PlayerCar[playerid][x][CarAusp]);fwrite(hFile, var);
    format(var, 32, "CarSideL=%d\n",PlayerCar[playerid][x][CarSideL]);fwrite(hFile, var);
    format(var, 32, "CarSideR=%d\n",PlayerCar[playerid][x][CarSideR]);fwrite(hFile, var);
    format(var, 32, "CarFB=%d\n",PlayerCar[playerid][x][CarFB]);fwrite(hFile, var);
    format(var, 32, "CarRB=%d\n",PlayerCar[playerid][x][CarRB]);fwrite(hFile, var);
    format(var, 32, "CarSpoiler=%d\n",PlayerCar[playerid][x][CarSpoiler]);fwrite(hFile, var);
    format(var, 32, "CarRoof=%d\n",PlayerCar[playerid][x][CarRoof]);fwrite(hFile, var);
    format(var, 32, "CarHood=%d\n",PlayerCar[playerid][x][CarHood]);fwrite(hFile, var);
    format(var, 32, "CarVents=%d\n",PlayerCar[playerid][x][CarVents]);fwrite(hFile, var);
    format(var, 32, "CarLamps=%d\n",PlayerCar[playerid][x][CarLamps]);fwrite(hFile, var);
    format(var, 32, "CarPJ=%d\n",PlayerCar[playerid][x][CarPJ]);fwrite(hFile, var);
    format(var, 32, "CarC1=%d\n",PlayerCar[playerid][x][CarC1]);fwrite(hFile, var);
    format(var, 32, "CarC2=%d\n",PlayerCar[playerid][x][CarC2]);fwrite(hFile, var);
    format(var, 32, "Preis=%d\n",PlayerCar[playerid][x][CarPreis]);fwrite(hFile, var);
    format(var, 32, "CarArrest=%d\n",PlayerCar[playerid][x][CarArrest]);fwrite(hFile, var);
    format(var, 32, "Plate=%s\n",PlayerCar[playerid][x][Plate]);fwrite(hFile, var);
    fclose(hFile);
    }
    }
    }
    }
    }

  • Wie fügst du denn das Neon an die Fahrzeuge an? Ist das noch der gleiche Code wie im letzten Thread, oder hast du den verändert?
    Poste davon bitte den aktuellen Code.



    Die restlichen Funktionen kannst du schonmal so umschreiben, dann haben wir schonmal den ersten Teil:

    Spoiler anzeigen
    enum dtc_PlayerCar
    {
    CarId,
    CarOwner[MAX_PLAYER_NAME],
    CarModel,
    Float:CarPos_x,
    Float:CarPos_y,
    Float:CarPos_z,
    Float:CarRotate,
    CarNitro,
    CarHyd,
    CarWheel,
    CarAusp,
    CarSideL,
    CarSideR,
    CarFB,
    CarRB,
    CarSpoiler,
    CarRoof,
    CarHood,
    CarVents,
    CarLamps,
    CarPJ,
    CarC1,
    CarC2,
    CarPreis,
    CarArrest,
    Plate[15],
    NeonID,
    NeonObject[2],
    };

    Spoiler anzeigen
    Function OnPlayerBuyCar(playerid,Model,Preis,Autohaus)//CARSYS
    {
    if(IsPlayerConnected(playerid) && !Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]])
    {
    CallRemoteFunction("M_GivePlayerMoney","id",playerid,-Preis);
    if(Autohaus == 2) //Billig Autohaus
    {
    SBizzInfo[1][sbTill] += Preis/4; //Billig Autohaus
    }
    if(Autohaus == 3) // luxus
    {
    SBizzInfo[0][sbTill] += Preis/4; // luxus
    }
    /*if(Autohaus == 7) // VIP-Autohaus
    {
    SBizzInfo[2][sbTill] += Preis/10; // VIP-Autohaus
    }*/
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Du hast dir ein Auto gekauft.");

    SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Gehe zu der KFZ Stelle und hole dir ein Kennzeichen.");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Fahre vorsichtig..Und denk an die StraßenVerkehrsOrdnung!");
    SendClientMessage(playerid,COLOR_GRAD2,"Navigation gesetzt!");
    SetParkPlatz(playerid,Autohaus);
    new name[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, name, sizeof name);
    format(str, sizeof str, "/Autos/%s%d.dtcar", name,Dtc_PlayerKey[playerid]);
    new File: hFile = fopen(str, io_write);
    if (hFile)
    {
    new var[32];
    format(var, 32, "CarId=0\n");fwrite(hFile, var);
    format(var, 32, "CarModel=%d\n",Model);fwrite(hFile, var);
    format(var, 32, "CarPos_x=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_x]);fwrite(hFile, var);
    format(var, 32, "CarPos_y=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_y]);fwrite(hFile, var);
    format(var, 32, "CarPos_z=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_z]);fwrite(hFile, var);
    format(var, 32, "CarRotate=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarRotate]);fwrite(hFile, var);
    format(var, 32, "CarNitro=0\n");fwrite(hFile, var);
    format(var, 32, "CarHyd=0\n");fwrite(hFile, var);
    format(var, 32, "CarWheel=0\n");fwrite(hFile, var);
    format(var, 32, "CarAusp=0\n");fwrite(hFile, var);
    format(var, 32, "CarSideL=0\n");fwrite(hFile, var);
    format(var, 32, "CarSideR=0\n");fwrite(hFile, var);
    format(var, 32, "CarFB=0\n");fwrite(hFile, var);
    format(var, 32, "CarRB=0\n");fwrite(hFile, var);
    format(var, 32, "CarSpoiler=0\n");fwrite(hFile, var);
    format(var, 32, "CarRoof=0\n");fwrite(hFile, var);
    format(var, 32, "CarHood=0\n");fwrite(hFile, var);
    format(var, 32, "CarVents=0\n");fwrite(hFile, var);
    format(var, 32, "CarLamps=0\n");fwrite(hFile, var);
    format(var, 32, "CarPJ=-1\n");fwrite(hFile, var);
    format(var, 32, "CarC1=-1\n");fwrite(hFile, var);
    format(var, 32, "CarC2=-1\n");fwrite(hFile, var);
    format(var, 32, "Preis=%d\n",Preis);fwrite(hFile, var);
    format(var, 32, "CarArrest=0\n");fwrite(hFile, var);
    format(var, 32, "Plate=[GDG]\n");fwrite(hFile, var);
    format(var, 32, "NeonID=-1\n");fwrite(hFile, var);
    fclose(hFile);
    }
    OnPlayerCarLogin(playerid);
    }
    }

    Spoiler anzeigen
    Function OnPlayerCarLogin(playerid)
    {
    for(new x = 0; x < MaxVeh; x++)
    {
    if(!Dtc_PlayerHaveCar[playerid][x])
    {
    new string2[128];
    new playername2[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername2, sizeof(playername2));
    format(string2, sizeof(string2), "/Autos/%s%d.dtcar", playername2,x);
    new File: UserFile = fopen(string2, io_read);
    if (UserFile)
    {
    Dtc_PlayerHaveCar[playerid][x] = 1;
    new key[ 256 ] , val[ 256 ];
    new Data[ 256 ];
    while ( fread( UserFile , Data , sizeof( Data ) ) )
    {
    key = ini_GetKey( Data );
    if( strcmp( key , "CarId" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarId] = strval( val ); }
    if( strcmp( key , "CarModel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarModel] = strval( val ); }
    if( strcmp( key , "CarPos_x" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_x] = floatstr( val ); }
    if( strcmp( key , "CarPos_y" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_y] = floatstr( val ); }
    if( strcmp( key , "CarPos_z" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPos_z] = floatstr( val ); }
    if( strcmp( key , "CarRotate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRotate] = floatstr( val ); }
    if( strcmp( key , "CarNitro" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarNitro] = strval( val ); }
    if( strcmp( key , "CarHyd" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarHyd] = strval( val ); }
    if( strcmp( key , "CarWheel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarWheel] = strval( val ); }
    if( strcmp( key , "CarAusp" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarAusp] = strval( val ); }
    if( strcmp( key , "CarSideL" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSideL] = strval( val ); }
    if( strcmp( key , "CarSideR" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSideR] = strval( val ); }
    if( strcmp( key , "CarFB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarFB] = strval( val ); }
    if( strcmp( key , "CarRB" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRB] = strval( val ); }
    if( strcmp( key , "CarSpoiler" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarSpoiler] = strval( val ); }
    if( strcmp( key , "CarRoof" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarRoof] = strval( val ); }
    if( strcmp( key , "CarHood" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarHood] = strval( val ); }
    if( strcmp( key , "CarVents" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarVents] = strval( val ); }
    if( strcmp( key , "CarLamps" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarLamps] = strval( val ); }
    if( strcmp( key , "CarPJ" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPJ] = strval( val ); }
    if( strcmp( key , "CarC1" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarC1] = strval( val ); }
    if( strcmp( key , "CarC2" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarC2] = strval( val ); }
    if( strcmp( key , "Preis" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarPreis] = strval( val ); }
    if( strcmp( key , "CarArrest" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][CarArrest] = strval( val ); }
    if( strcmp( key , "Plate" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][Plate] = strval( val ); }
    if( strcmp( key , "NeonID" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerCar[playerid][x][NeonID] = strval( val ); }
    }
    fclose(UserFile);
    PlayerCarSpawn(playerid,x);
    }
    }
    }
    }

    Spoiler anzeigen
    Function PlayerCarSpawn(playerid,Slot)
    {
    if(IsPlayerConnected(playerid))
    {
    if(Dtc_PlayerHaveCar[playerid][Slot])
    {
    PlayerCar[playerid][Slot][CarId] = CreateVehicle(PlayerCar[playerid][Slot][CarModel],PlayerCar[playerid][Slot][CarPos_x],PlayerCar[playerid][Slot][CarPos_y],PlayerCar[playerid][Slot][CarPos_z],PlayerCar[playerid][Slot][CarRotate],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2], 60000);/*vehicle spawn*/
    CarTuning(playerid,Slot);
    new strings[15];
    new name[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, name, sizeof name);
    format(str, sizeof str, "/Autos/%s%d.dtcar", name,Dtc_PlayerKey[playerid]);
    //format(strings, sizeof(strings), "%s", dini_Get(str, "CarPlate"));
    format(strings, sizeof(strings), "%s", dini_Get(str, "Plate"));
    SetVehicleNumberPlate(PlayerCar[playerid][Slot][CarId], strings);
    SetVehicleToRespawn(PlayerCar[playerid][Slot][CarId]);
    for(new x = 0; x < MaxVeh; x++)
    {
    PlayerCar[playerid][x][Plate] = strings;
    }
    }
    }
    }

    Spoiler anzeigen
    Function OnPlayerCarUpdate(playerid)
    {
    if(IsPlayerConnected(playerid))
    {
    for(new x = 0; x < MaxVeh; x++)
    {
    if(Dtc_PlayerHaveCar[playerid][x])
    {
    DestroyVehicle(PlayerCar[playerid][x][CarId]);
    Dtc_Carlock[PlayerCar[playerid][x][CarId]] = 0;
    Dtc_LockCar(PlayerCar[playerid][x][CarId]);
    new string3[128];
    new playername3[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername3, sizeof(playername3));
    format(string3, sizeof(string3), "/Autos/%s%d.dtcar", playername3,x);
    new File: hFile = fopen(string3, io_write);
    if (hFile)
    {
    new var[32];
    format(var, 32, "CarId=%d\n",PlayerCar[playerid][x][CarId]);fwrite(hFile, var);
    format(var, 32, "CarModel=%d\n",PlayerCar[playerid][x][CarModel]);fwrite(hFile, var);
    format(var, 32, "CarPos_x=%.3f\n",PlayerCar[playerid][x][CarPos_x]);fwrite(hFile, var);
    format(var, 32, "CarPos_y=%.3f\n",PlayerCar[playerid][x][CarPos_y]);fwrite(hFile, var);
    format(var, 32, "CarPos_z=%.3f\n",PlayerCar[playerid][x][CarPos_z]);fwrite(hFile, var);
    format(var, 32, "CarRotate=%.3f\n",PlayerCar[playerid][x][CarRotate]);fwrite(hFile, var);
    format(var, 32, "CarNitro=%d\n",PlayerCar[playerid][x][CarNitro]);fwrite(hFile, var);
    format(var, 32, "CarHyd=%d\n",PlayerCar[playerid][x][CarHyd]);fwrite(hFile, var);
    format(var, 32, "CarWheel=%d\n",PlayerCar[playerid][x][CarWheel]);fwrite(hFile, var);
    format(var, 32, "CarAusp=%d\n",PlayerCar[playerid][x][CarAusp]);fwrite(hFile, var);
    format(var, 32, "CarSideL=%d\n",PlayerCar[playerid][x][CarSideL]);fwrite(hFile, var);
    format(var, 32, "CarSideR=%d\n",PlayerCar[playerid][x][CarSideR]);fwrite(hFile, var);
    format(var, 32, "CarFB=%d\n",PlayerCar[playerid][x][CarFB]);fwrite(hFile, var);
    format(var, 32, "CarRB=%d\n",PlayerCar[playerid][x][CarRB]);fwrite(hFile, var);
    format(var, 32, "CarSpoiler=%d\n",PlayerCar[playerid][x][CarSpoiler]);fwrite(hFile, var);
    format(var, 32, "CarRoof=%d\n",PlayerCar[playerid][x][CarRoof]);fwrite(hFile, var);
    format(var, 32, "CarHood=%d\n",PlayerCar[playerid][x][CarHood]);fwrite(hFile, var);
    format(var, 32, "CarVents=%d\n",PlayerCar[playerid][x][CarVents]);fwrite(hFile, var);
    format(var, 32, "CarLamps=%d\n",PlayerCar[playerid][x][CarLamps]);fwrite(hFile, var);
    format(var, 32, "CarPJ=%d\n",PlayerCar[playerid][x][CarPJ]);fwrite(hFile, var);
    format(var, 32, "CarC1=%d\n",PlayerCar[playerid][x][CarC1]);fwrite(hFile, var);
    format(var, 32, "CarC2=%d\n",PlayerCar[playerid][x][CarC2]);fwrite(hFile, var);
    format(var, 32, "Preis=%d\n",PlayerCar[playerid][x][CarPreis]);fwrite(hFile, var);
    format(var, 32, "CarArrest=%d\n",PlayerCar[playerid][x][CarArrest]);fwrite(hFile, var);
    format(var, 32, "Plate=%s\n",PlayerCar[playerid][x][Plate]);fwrite(hFile, var);
    format(var, 32, "NeonID=%d\n",PlayerCar[playerid][x][NeonID]);fwrite(hFile, var);
    fclose(hFile);
    }
    }
    }
    }
    }

  • Schonmal vielen Dank Jeffry <3


    Nein, ich hab nichtmehr EXAKT das selbe Neonsystem. Ich nutze derzeit ein anderes :D
    Ich schreibs einfach mal komplett hier hin ... Aber die nächste frage ist dann noch ... ich habe ja mehrere Farben... wird dann auch die farbe geladen, die man raufgehauen hat?


    Das ist der Dialog der kommt, wenn man /neontest eingibt. ^^ ( Wie es derzeit gespeichert wird ist " Schrott" da es leider nur mit der VEHICLE ID Speichert. Und da ichs selber nicht hinbekommen habe, wie man das mit dem PlayerKey (Also das Privat auto ) macht, hatte ich hier nachgefragt
    if(dialogid == neondialog)
    {
    if(response)
    {
    if(listitem == 0)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon", CreateObject(18648,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon1", CreateObject(18648,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, 0xFFFFFFAA, "Neonlichter installiert!");
    new NeonDatei[64];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof name);
    format(NeonDatei, sizeof(NeonDatei), "/Neons/%s%d.ini", name,Dtc_PlayerKey[playerid]);
    dini_Create(NeonDatei);
    dini_Set(NeonDatei, "Farbe", "DunkelBlau");
    }
    if(listitem == 1)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon2", CreateObject(18647,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon3", CreateObject(18647,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon2"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon3"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, 0xFFFFFFAA, "Neon Installiert");
    new NeonDatei[64];
    format(NeonDatei,sizeof(NeonDatei),"/Neons/%d%s.ini", GetPlayerVehicleID(playerid));
    dini_Create(NeonDatei);
    dini_Set(NeonDatei, "Farbe", "Rot");
    }
    if(listitem == 2)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon4", CreateObject(18649,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon5", CreateObject(18649,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon4"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon5"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, 0xFFFFFFAA, "Neonlichter installiert!");
    new NeonDatei[64];
    format(NeonDatei,sizeof(NeonDatei),"/Neons/%d%s.ini", GetPlayerVehicleID(playerid));
    dini_Create(NeonDatei);
    dini_Set(NeonDatei, "Farbe", "Gruen");
    }
    if(listitem == 3)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon6", CreateObject(18652,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon7", CreateObject(18652,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon6"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon7"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, 0xFFFFFFAA, "Neonlichter installiert!");
    new NeonDatei[64];
    format(NeonDatei,sizeof(NeonDatei),"/Neons/%d%s.ini", GetPlayerVehicleID(playerid));
    dini_Create(NeonDatei);
    dini_Set(NeonDatei, "Farbe", "Weiss");
    }
    if(listitem == 4)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon8", CreateObject(18651,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon9", CreateObject(18651,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon8"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon9"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, 0xFFFFFFAA, "Neonlichter installiert!");
    new NeonDatei[64];
    format(NeonDatei,sizeof(NeonDatei),"/Neons/%d%s.ini", GetPlayerVehicleID(playerid));
    dini_Create(NeonDatei);
    dini_Set(NeonDatei, "Farbe", "Lila");
    }
    if(listitem == 5)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon10", CreateObject(18650,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon11", CreateObject(18650,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon10"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon11"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, 0xFFFFFFAA, "Neonlichter installiert!");
    new NeonDatei[64];
    format(NeonDatei,sizeof(NeonDatei),"/Neons/%d%s.ini", GetPlayerVehicleID(playerid));
    dini_Create(NeonDatei);
    dini_Set(NeonDatei, "Farbe", "Gelb");
    }
    if(listitem == 6)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon12", CreateObject(18648,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon13", CreateObject(18648,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon14", CreateObject(18649,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon15", CreateObject(18649,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon12"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon13"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon14"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon15"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, 0xFFFFFFAA, "Neonlichter installiert!");
    new NeonDatei[64];
    format(NeonDatei,sizeof(NeonDatei),"/Neons/%d%s.ini", GetPlayerVehicleID(playerid));
    dini_Create(NeonDatei);
    dini_Set(NeonDatei, "Farbe", "Tuerkis");
    }
    if(listitem == 7)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon16", CreateObject(18648,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon17", CreateObject(18648,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon18", CreateObject(18652,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon19", CreateObject(18652,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon16"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon17"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon18"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon19"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, 0xFFFFFFAA, "Neonlichter installiert!");
    new NeonDatei[64];
    format(NeonDatei,sizeof(NeonDatei),"/Neons/%d%s.ini", GetPlayerVehicleID(playerid));
    dini_Create(NeonDatei);
    dini_Set(NeonDatei, "Farbe", "HellBlau");
    }
    if(listitem == 8)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon20", CreateObject(18647,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon21", CreateObject(18647,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon22", CreateObject(18652,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon23", CreateObject(18652,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon20"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon21"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon22"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon23"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, 0xFFFFFFAA, "Neonlichter installiert!");
    new NeonDatei[64];
    format(NeonDatei,sizeof(NeonDatei),"/Neons/%d%s.ini", GetPlayerVehicleID(playerid));
    dini_Create(NeonDatei);
    dini_Set(NeonDatei, "Farbe", "Pink");
    }
    if(listitem == 9)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon24", CreateObject(18647,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon25", CreateObject(18647,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon26", CreateObject(18650,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon27", CreateObject(18650,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon24"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon25"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon26"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon27"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, 0xFFFFFFAA, "Neonlichter installiert!");
    new NeonDatei[64];
    format(NeonDatei,sizeof(NeonDatei),"/Neons/%d%s.ini", GetPlayerVehicleID(playerid));
    dini_Create(NeonDatei);
    dini_Set(NeonDatei, "Farbe", "Orange");
    }
    if(listitem == 10)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon28", CreateObject(18649,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon29", CreateObject(18649,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon30", CreateObject(18652,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon31", CreateObject(18652,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon28"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon29"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon30"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon31"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, 0xFFFFFFAA, "Neonlichter installiert!");
    new NeonDatei[64];
    format(NeonDatei,sizeof(NeonDatei),"/Neons/%d%s.ini", GetPlayerVehicleID(playerid));
    dini_Create(NeonDatei);
    dini_Set(NeonDatei, "Farbe", "HellGruen");
    }
    if(listitem == 11)
    {
    SetPVarInt(playerid, "Status", 1);
    SetPVarInt(playerid, "neon32", CreateObject(18652,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon33", CreateObject(18652,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon34", CreateObject(18650,0,0,0,0,0,0));
    SetPVarInt(playerid, "neon35", CreateObject(18650,0,0,0,0,0,0));
    AttachObjectToVehicle(GetPVarInt(playerid, "neon32"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon33"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon34"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(GetPVarInt(playerid, "neon35"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, 0xFFFFFFAA, "Neonlichter installiert!");
    new NeonDatei[64];
    format(NeonDatei,sizeof(NeonDatei),"/Neons/%d%s.ini", GetPlayerVehicleID(playerid));
    dini_Create(NeonDatei);
    dini_Set(NeonDatei, "Farbe", "Gold");
    }
    if(listitem == 12)
    {
    DestroyObject(GetPVarInt(playerid, "neon")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon1")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon2")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon3"));
    DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon4")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon5")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon6")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon7"));
    DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon8")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon9")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon10")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon11"));
    DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon12")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon13")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon14")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon15"));
    DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon16")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon17")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon18")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon19"));
    DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon20")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon21")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon22")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon23"));
    DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon24")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon25")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon26")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon27"));
    DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon28")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon29")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon30")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon31"));
    DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon32")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon33")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon34")); DeletePVar(playerid, "Status"); DestroyObject(GetPVarInt(playerid, "neon35"));
    SendClientMessage(playerid, 0xFFFFFFAA, "Neonlichter entfernt!");
    new NeonDatei[64];
    format(NeonDatei,sizeof(NeonDatei),"/Neons/%d%s.ini", GetPlayerVehicleID(playerid));
    dini_Remove(NeonDatei);
    }
    }
    }

  • Ok, zu den obigen Änderungen, die ich dir bereits gegeben habe, kommt jetzt das hier (mach zuerst das vom ersten Post, falls noch nicht gemacht).

    Spoiler anzeigen
    NeonObject[2],
    Wieder aus dem enum entfernen.

    Spoiler anzeigen
    new PlayerCarNeon[MAX_PLAYERS][MaxVeh][4];
    Nach dem enum irgendwo einfügen.

    Spoiler anzeigen
    Der Dialog:
    if(dialogid == neondialog)
    {
    if(response)
    {
    new vID = GetPlayerVehicleID(playerid);
    for(new slot = 0; slot < MaxVeh; slot++)
    {
    if(Dtc_PlayerHaveCar[playerid][slot])
    {
    if(PlayerCar[playerid][slot][CarId] == vID)
    {
    if(listitem != 12)
    {
    SendClientMessage(playerid, 0xFFFFFFAA, "Neonlichter installiert!");
    SetupPlayerCarNeon(playerid, slot, 0); //Erst die alten entfernen, falls welche dran sind.
    }
    else SendClientMessage(playerid, 0xFFFFFFAA, "Neonlichter entfernt!");
    SetupPlayerCarNeon(playerid, slot, listitem+1);
    OnPlayerCarUpdate(playerid);
    return 1;
    }
    }
    }
    }
    return 1;
    }

    Spoiler anzeigen
    Unten im Gamemode:
    stock SetupPlayerCarNeon(playerid, slot, id)
    {
    new vID = GetPlayerVehicleID(playerid);
    switch(id)
    {
    case 1:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18648,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18648,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], , -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 2:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18647,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18647,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 3:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18649,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18649,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 4:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18652,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18652,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 5:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18651,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18651,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 6:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18650,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18650,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 7:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18648,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18648,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][2] = CreateObject(18649,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][3] = CreateObject(18649,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][2], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][3], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 8:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18648,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18648,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][2] = CreateObject(18652,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][3] = CreateObject(18652,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][2], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][3], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 9:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18647,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18647,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][2] = CreateObject(18652,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][3] = CreateObject(18652,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][2], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][3], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 10:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18647,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18647,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][2] = CreateObject(18650,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][3] = CreateObject(18650,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][2], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][3], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 11:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18649,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18649,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][2] = CreateObject(18652,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][3] = CreateObject(18652,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][2], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][3], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 12:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18652,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18652,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][2] = CreateObject(18650,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][3] = CreateObject(18650,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][2], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][3], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    default:
    {
    if(PlayerCar[playerid][slot][NeonID] > 0)
    {
    DestroyObject(PlayerCarNeon[playerid][slot][0]);
    DestroyObject(PlayerCarNeon[playerid][slot][1]);
    if(PlayerCar[playerid][slot][NeonID] > 6)
    {
    DestroyObject(PlayerCarNeon[playerid][slot][2]);
    DestroyObject(PlayerCarNeon[playerid][slot][3]);
    }
    }
    PlayerCar[playerid][slot][NeonID] = 0;
    return 1;
    }
    }
    PlayerCar[playerid][slot][NeonID] = id;
    return 1;
    }

    Spoiler anzeigen
    Und diese Funktionen so abändern:
    Function PlayerCarSpawn(playerid,Slot)
    {
    if(IsPlayerConnected(playerid))
    {
    if(Dtc_PlayerHaveCar[playerid][Slot])
    {
    PlayerCar[playerid][Slot][CarId] = CreateVehicle(PlayerCar[playerid][Slot][CarModel],PlayerCar[playerid][Slot][CarPos_x],PlayerCar[playerid][Slot][CarPos_y],PlayerCar[playerid][Slot][CarPos_z],PlayerCar[playerid][Slot][CarRotate],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2], 60000);/*vehicle spawn*/
    CarTuning(playerid,Slot);
    new strings[15];
    new name[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, name, sizeof name);
    format(str, sizeof str, "/Autos/%s%d.dtcar", name,Dtc_PlayerKey[playerid]);
    //format(strings, sizeof(strings), "%s", dini_Get(str, "CarPlate"));
    format(strings, sizeof(strings), "%s", dini_Get(str, "Plate"));
    SetVehicleNumberPlate(PlayerCar[playerid][Slot][CarId], strings);
    SetVehicleToRespawn(PlayerCar[playerid][Slot][CarId]);
    format(PlayerCar[playerid][x][Plate], 64, strings);
    SetupPlayerCarNeon(playerid, x, PlayerCar[playerid][Slot][NeonID]);
    }
    }
    }

    Spoiler anzeigen
    Function OnPlayerBuyCar(playerid,Model,Preis,Autohaus)//CARSYS
    {
    if(IsPlayerConnected(playerid) && !Dtc_PlayerHaveCar[playerid][Dtc_PlayerKey[playerid]])
    {
    CallRemoteFunction("M_GivePlayerMoney","id",playerid,-Preis);
    if(Autohaus == 2) //Billig Autohaus
    {
    SBizzInfo[1][sbTill] += Preis/4; //Billig Autohaus
    }
    if(Autohaus == 3) // luxus
    {
    SBizzInfo[0][sbTill] += Preis/4; // luxus
    }
    /*if(Autohaus == 7) // VIP-Autohaus
    {
    SBizzInfo[2][sbTill] += Preis/10; // VIP-Autohaus
    }*/
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Du hast dir ein Auto gekauft.");

    SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Gehe zu der KFZ Stelle und hole dir ein Kennzeichen.");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "*Fahre vorsichtig..Und denk an die StraßenVerkehrsOrdnung!");
    SendClientMessage(playerid,COLOR_GRAD2,"Navigation gesetzt!");
    SetParkPlatz(playerid,Autohaus);
    new name[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, name, sizeof name);
    format(str, sizeof str, "/Autos/%s%d.dtcar", name,Dtc_PlayerKey[playerid]);
    new File: hFile = fopen(str, io_write);
    if (hFile)
    {
    new var[32];
    format(var, 32, "CarId=0\n");fwrite(hFile, var);
    format(var, 32, "CarModel=%d\n",Model);fwrite(hFile, var);
    format(var, 32, "CarPos_x=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_x]);fwrite(hFile, var);
    format(var, 32, "CarPos_y=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_y]);fwrite(hFile, var);
    format(var, 32, "CarPos_z=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarPos_z]);fwrite(hFile, var);
    format(var, 32, "CarRotate=%.3f\n",PlayerCar[playerid][Dtc_PlayerKey[playerid]][CarRotate]);fwrite(hFile, var);
    format(var, 32, "CarNitro=0\n");fwrite(hFile, var);
    format(var, 32, "CarHyd=0\n");fwrite(hFile, var);
    format(var, 32, "CarWheel=0\n");fwrite(hFile, var);
    format(var, 32, "CarAusp=0\n");fwrite(hFile, var);
    format(var, 32, "CarSideL=0\n");fwrite(hFile, var);
    format(var, 32, "CarSideR=0\n");fwrite(hFile, var);
    format(var, 32, "CarFB=0\n");fwrite(hFile, var);
    format(var, 32, "CarRB=0\n");fwrite(hFile, var);
    format(var, 32, "CarSpoiler=0\n");fwrite(hFile, var);
    format(var, 32, "CarRoof=0\n");fwrite(hFile, var);
    format(var, 32, "CarHood=0\n");fwrite(hFile, var);
    format(var, 32, "CarVents=0\n");fwrite(hFile, var);
    format(var, 32, "CarLamps=0\n");fwrite(hFile, var);
    format(var, 32, "CarPJ=-1\n");fwrite(hFile, var);
    format(var, 32, "CarC1=-1\n");fwrite(hFile, var);
    format(var, 32, "CarC2=-1\n");fwrite(hFile, var);
    format(var, 32, "Preis=%d\n",Preis);fwrite(hFile, var);
    format(var, 32, "CarArrest=0\n");fwrite(hFile, var);
    format(var, 32, "Plate=[GDG]\n");fwrite(hFile, var);
    format(var, 32, "NeonID=0\n");fwrite(hFile, var);
    fclose(hFile);
    }
    OnPlayerCarLogin(playerid);
    }
    }


    Ich hoffe, dass da keine Fehler drin sind, da ich es natürlich nicht kompilieren konnte. Falls welche drin sind, oder falls es nicht funktioniert, sag Bescheid.

  • Bekomme beim Compilen folgende Errors :
    C:\Users\LordTourette\Desktop\Scripting GBR\James Corner Script leeched\gamemodes\gdg2.pwn(4568) : error 029: invalid expression, assumed zero
    C:\Users\LordTourette\Desktop\Scripting GBR\James Corner Script leeched\gamemodes\gdg2.pwn(70136) : error 017: undefined symbol "x"
    C:\Users\LordTourette\Desktop\Scripting GBR\James Corner Script leeched\gamemodes\gdg2.pwn(70137) : error 017: undefined symbol "x"
    C:\Users\LordTourette\Desktop\Scripting GBR\James Corner Script leeched\gamemodes\gdg2.pwn(75673) : warning 203: symbol is never used: "M_OnPlayerCommandText"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    3 Errors.

  • Function PlayerCarSpawn(playerid,Slot)
    {
    if(IsPlayerConnected(playerid))
    {
    if(Dtc_PlayerHaveCar[playerid][Slot])
    {
    PlayerCar[playerid][Slot][CarId] = CreateVehicle(PlayerCar[playerid][Slot][CarModel],PlayerCar[playerid][Slot][CarPos_x],PlayerCar[playerid][Slot][CarPos_y],PlayerCar[playerid][Slot][CarPos_z],PlayerCar[playerid][Slot][CarRotate],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2], 60000);/*vehicle spawn*/
    CarTuning(playerid,Slot);
    new strings[15];
    new name[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, name, sizeof name);
    format(str, sizeof str, "/Autos/%s%d.dtcar", name,Dtc_PlayerKey[playerid]);
    //format(strings, sizeof(strings), "%s", dini_Get(str, "CarPlate"));
    format(strings, sizeof(strings), "%s", dini_Get(str, "Plate"));
    SetVehicleNumberPlate(PlayerCar[playerid][Slot][CarId], strings);
    SetVehicleToRespawn(PlayerCar[playerid][Slot][CarId]);
    format(PlayerCar[playerid][x][Plate], 64, strings);//Hier ist Zeile 70136
    SetupPlayerCarNeon(playerid, x, PlayerCar[playerid][Slot][NeonID]);//Hier ist Zeile 70137
    }
    }
    }

  • So:
    Function PlayerCarSpawn(playerid,Slot)
    {
    if(IsPlayerConnected(playerid))
    {
    if(Dtc_PlayerHaveCar[playerid][Slot])
    {
    PlayerCar[playerid][Slot][CarId] = CreateVehicle(PlayerCar[playerid][Slot][CarModel],PlayerCar[playerid][Slot][CarPos_x],PlayerCar[playerid][Slot][CarPos_y],PlayerCar[playerid][Slot][CarPos_z],PlayerCar[playerid][Slot][CarRotate],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2], 60000);/*vehicle spawn*/
    CarTuning(playerid,Slot);
    new strings[15];
    new name[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, name, sizeof name);
    format(str, sizeof str, "/Autos/%s%d.dtcar", name,Dtc_PlayerKey[playerid]);
    //format(strings, sizeof(strings), "%s", dini_Get(str, "CarPlate"));
    format(strings, sizeof(strings), "%s", dini_Get(str, "Plate"));
    SetVehicleNumberPlate(PlayerCar[playerid][Slot][CarId], strings);
    SetVehicleToRespawn(PlayerCar[playerid][Slot][CarId]);
    format(PlayerCar[playerid][Slot][Plate], 64, strings);//Hier ist Zeile 70136
    SetupPlayerCarNeon(playerid, Slot, PlayerCar[playerid][Slot][NeonID]);//Hier ist Zeile 70137
    }
    }
    }


    Zeile 4568?
    EDIT: JoshJosh82: Ok. :)

    3HZXdYd.png

    Einmal editiert, zuletzt von Jeffry ()

  • Zeile 4568 hatte sich bereits erleidigt. Da war lediglich vID vergessen worden ^^


    EDIT Jeffry Hab nun alles gemacht, wie du es sagtest. jetzt ist nur das Problem, dass das Auto VERSCHWINDET wenn ich Neon installier
    EDIT2 Jeffry Problem : Man installiert das NEON und ALLE Autos verschwinden einfach (Also die eigenen Autos wo man den Key für hat)

    2 Mal editiert, zuletzt von JoshJosh82 ()

  • Ok, ich sehe grade, dass deine Speicher-Funktion die Fahrzeuge löscht.
    Füge das hier ganz unten in den Gamemode ein:
    Function OnPlayerCarUpdate_Neon(playerid, x)
    {
    if(IsPlayerConnected(playerid))
    {
    if(Dtc_PlayerHaveCar[playerid][x])
    {
    new string3[128];
    new playername3[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername3, sizeof(playername3));
    format(string3, sizeof(string3), "/Autos/%s%d.dtcar", playername3,x);
    new File: hFile = fopen(string3, io_write);
    if (hFile)
    {
    new var[32];
    format(var, 32, "CarId=%d\n",PlayerCar[playerid][x][CarId]);fwrite(hFile, var);
    format(var, 32, "CarModel=%d\n",PlayerCar[playerid][x][CarModel]);fwrite(hFile, var);
    format(var, 32, "CarPos_x=%.3f\n",PlayerCar[playerid][x][CarPos_x]);fwrite(hFile, var);
    format(var, 32, "CarPos_y=%.3f\n",PlayerCar[playerid][x][CarPos_y]);fwrite(hFile, var);
    format(var, 32, "CarPos_z=%.3f\n",PlayerCar[playerid][x][CarPos_z]);fwrite(hFile, var);
    format(var, 32, "CarRotate=%.3f\n",PlayerCar[playerid][x][CarRotate]);fwrite(hFile, var);
    format(var, 32, "CarNitro=%d\n",PlayerCar[playerid][x][CarNitro]);fwrite(hFile, var);
    format(var, 32, "CarHyd=%d\n",PlayerCar[playerid][x][CarHyd]);fwrite(hFile, var);
    format(var, 32, "CarWheel=%d\n",PlayerCar[playerid][x][CarWheel]);fwrite(hFile, var);
    format(var, 32, "CarAusp=%d\n",PlayerCar[playerid][x][CarAusp]);fwrite(hFile, var);
    format(var, 32, "CarSideL=%d\n",PlayerCar[playerid][x][CarSideL]);fwrite(hFile, var);
    format(var, 32, "CarSideR=%d\n",PlayerCar[playerid][x][CarSideR]);fwrite(hFile, var);
    format(var, 32, "CarFB=%d\n",PlayerCar[playerid][x][CarFB]);fwrite(hFile, var);
    format(var, 32, "CarRB=%d\n",PlayerCar[playerid][x][CarRB]);fwrite(hFile, var);
    format(var, 32, "CarSpoiler=%d\n",PlayerCar[playerid][x][CarSpoiler]);fwrite(hFile, var);
    format(var, 32, "CarRoof=%d\n",PlayerCar[playerid][x][CarRoof]);fwrite(hFile, var);
    format(var, 32, "CarHood=%d\n",PlayerCar[playerid][x][CarHood]);fwrite(hFile, var);
    format(var, 32, "CarVents=%d\n",PlayerCar[playerid][x][CarVents]);fwrite(hFile, var);
    format(var, 32, "CarLamps=%d\n",PlayerCar[playerid][x][CarLamps]);fwrite(hFile, var);
    format(var, 32, "CarPJ=%d\n",PlayerCar[playerid][x][CarPJ]);fwrite(hFile, var);
    format(var, 32, "CarC1=%d\n",PlayerCar[playerid][x][CarC1]);fwrite(hFile, var);
    format(var, 32, "CarC2=%d\n",PlayerCar[playerid][x][CarC2]);fwrite(hFile, var);
    format(var, 32, "Preis=%d\n",PlayerCar[playerid][x][CarPreis]);fwrite(hFile, var);
    format(var, 32, "CarArrest=%d\n",PlayerCar[playerid][x][CarArrest]);fwrite(hFile, var);
    format(var, 32, "Plate=%s\n",PlayerCar[playerid][x][Plate]);fwrite(hFile, var);
    format(var, 32, "NeonID=%d\n",PlayerCar[playerid][x][NeonID]);fwrite(hFile, var);
    fclose(hFile);
    }
    }
    }
    }


    Und ändere:
    SetupPlayerCarNeon(playerid, slot, listitem+1);
    OnPlayerCarUpdate(playerid);
    zu:
    SetupPlayerCarNeon(playerid, slot, listitem+1);
    OnPlayerCarUpdate_Neon(playerid, slot);

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Also in der Datei bei MEINEM Fahrzeug steht :
    CarId=536
    CarModel=506
    CarPos_x=1498.251
    CarPos_y=-1681.689
    CarPos_z=12.883
    CarRotate=269.519
    CarNitro=0
    CarHyd=0
    CarWheel=0
    CarAusp=0
    CarSideL=0
    CarSideR=0
    CarFB=0
    CarRB=0
    CarSpoiler=0
    CarRoof=0
    CarHood=0
    CarVents=0
    CarLamps=0
    CarPJ=-1
    CarC1=-1
    CarC2=-1
    Preis=250000
    CarArrest=0
    Plate=[GDG]
    NeonID=3

  • Das ist ja schonmal gut, es wird gespeichert.
    Function PlayerCarSpawn(playerid,Slot)
    {
    if(IsPlayerConnected(playerid))
    {
    if(Dtc_PlayerHaveCar[playerid][Slot])
    {
    PlayerCar[playerid][Slot][CarId] = CreateVehicle(PlayerCar[playerid][Slot][CarModel],PlayerCar[playerid][Slot][CarPos_x],PlayerCar[playerid][Slot][CarPos_y],PlayerCar[playerid][Slot][CarPos_z],PlayerCar[playerid][Slot][CarRotate],PlayerCar[playerid][Slot][CarC1],PlayerCar[playerid][Slot][CarC2], 60000);/*vehicle spawn*/
    CarTuning(playerid,Slot);
    new strings[15];
    new name[MAX_PLAYER_NAME], str[128];
    GetPlayerName(playerid, name, sizeof name);
    format(str, sizeof str, "/Autos/%s%d.dtcar", name,Dtc_PlayerKey[playerid]);
    //format(strings, sizeof(strings), "%s", dini_Get(str, "CarPlate"));
    format(strings, sizeof(strings), "%s", dini_Get(str, "Plate"));
    SetVehicleNumberPlate(PlayerCar[playerid][Slot][CarId], strings);
    SetVehicleToRespawn(PlayerCar[playerid][Slot][CarId]);
    format(PlayerCar[playerid][Slot][Plate], 64, strings);
    printf("Füge Fahrzeug Slot %d das Neon %d hinzu.", Slot, PlayerCar[playerid][Slot][NeonID]);
    SetupPlayerCarNeon(playerid, Slot, PlayerCar[playerid][Slot][NeonID]);
    }
    }
    }


    Was wird so im server_log geprintet, wenn du dich einloggst?

  • Dann bekomm ich eine Error Meldung ... C:\Users\LordTourette\Desktop\Scripting GBR\James Corner Script leeched\gamemodes\gdg2.pwn(4561) : error 017: undefined symbol "Slot"


    Die Zeile bzw der Abschnitt ist :
    stock SetupPlayerCarNeon(playerid, slot, id)
    {
    new vID = PlayerCar[playerid][Slot][CarId];//Die Zeile hier ist das
    switch(id)
    {
    case 1:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18648,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18648,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 2:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18647,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18647,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 3:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18649,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18649,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 4:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18652,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18652,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 5:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18651,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18651,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 6:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18650,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18650,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 7:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18648,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18648,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][2] = CreateObject(18649,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][3] = CreateObject(18649,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][2], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][3], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 8:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18648,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18648,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][2] = CreateObject(18652,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][3] = CreateObject(18652,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][2], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][3], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 9:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18647,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18647,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][2] = CreateObject(18652,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][3] = CreateObject(18652,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][2], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][3], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 10:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18647,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18647,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][2] = CreateObject(18650,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][3] = CreateObject(18650,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][2], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][3], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 11:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18649,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18649,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][2] = CreateObject(18652,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][3] = CreateObject(18652,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][2], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][3], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    case 12:
    {
    PlayerCarNeon[playerid][slot][0] = CreateObject(18652,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][1] = CreateObject(18652,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][2] = CreateObject(18650,0,0,0,0,0,0);
    PlayerCarNeon[playerid][slot][3] = CreateObject(18650,0,0,0,0,0,0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][0], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][1], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][2], vID, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    AttachObjectToVehicle(PlayerCarNeon[playerid][slot][3], vID, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
    }
    default:
    {
    if(PlayerCar[playerid][slot][NeonID] > 0)
    {
    DestroyObject(PlayerCarNeon[playerid][slot][0]);
    DestroyObject(PlayerCarNeon[playerid][slot][1]);
    if(PlayerCar[playerid][slot][NeonID] > 6)
    {
    DestroyObject(PlayerCarNeon[playerid][slot][2]);
    DestroyObject(PlayerCarNeon[playerid][slot][3]);
    }
    }
    PlayerCar[playerid][slot][NeonID] = 0;
    return 1;
    }
    }
    PlayerCar[playerid][slot][NeonID] = id;
    return 1;
    }


    EDIT Jeffry Habe den Error wegbekommen (Slot musste kleingeschrieben werden ... ^^)