Problem mit dem Autohaus

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
  • z.B. Beim Sultan werden die SeitenTeile gespeichert aber bei denn anderen Fahrzeugen net ;(


    Warum???


    ich verstehe es net ;(


    Ich habe alle ids 3 mal schon abgeschrieben aber sie werden einfach net gespeichert.


    bitte um hilfe.


    mfg. Fabi.StaR

    Mit freundlichen Grüßen,


    Fabi.StaR :love::saint:


  • SeitenTeile:

    Spoiler anzeigen
    new SideskirtR[22][0] = {
    {1007},{1026},{1031},
    {1036},{1041},{1042},
    {1047},{1048},{1056},
    {1057},{1069},{1070},
    {1090},{1093},{1095},
    {1106},{1108},{1118},
    {1119},{1122},{1133},
    {1134}
    };
    new SideskirtL[20][0] = {
    {1017},{1027},{1030},
    {1039},{1040},{1051},
    {1052},{1062},{1063},
    {1071},{1072},{1094},
    {1099},{1101},{1102},
    {1107},{1120},{1121},
    {1124},{1137}
    };

    HirGettype:
    Spoiler anzeigen
    GetModType(componentid)
    {
    for(new i=0; i<20; i++){if(spoiler[i][0]==componentid){ return 1; }}
    for(new i=0; i<3; i++){if(nitro[i][0]==componentid){ return 2; }}
    for(new i=0; i<17; i++){if(wheels[i][0]==componentid){ return 3; }}
    for(new i=0; i<2; i++){if(lights[i][0]==componentid){ return 4; }}
    for(new i=0; i<4; i++){if(Hood[i][0]==componentid) { return 5; }}
    for(new i=0; i<30; i++){if(exhaust[i][0]==componentid) { return 6; }}
    for(new i=0; i<1; i++){if(hydrau[i][0]==componentid) { return 7; }}
    for(new i=0; i<17; i++){if(roof[i][0]==componentid) { return 8; }}
    for(new i=0; i<1; i++){if(stereo[i][0]==componentid) { return 9; }}
    for(new i=0; i<23; i++){if(FrontBumper[i][0]==componentid) { return 10; }}
    for(new i=0; i<22; i++){if(RearBumper[i][0]==componentid) { return 11; }}
    for(new i=0; i<2; i++){if(VentsR[i][0]==componentid) { return 12; }}
    for(new i=0; i<2; i++){if(VentsL[i][0]==componentid) { return 13; }}
    for(new i=0; i<20; i++){if(SideskirtL[i][0]==componentid) { return 14; }}
    for(new i=0; i<22; i++){if(SideskirtR[i][0]==componentid) { return 15; }}
    for(new i=0; i<1; i++){if(Bullbar[i][0]==componentid) { return 16; }}
    for(new i=0; i<2; i++){if(RearBullbars[i][0]==componentid) { return 17; }}
    for(new i=0; i<2; i++){if(FrontBullbars[i][0]==componentid) { return 18; }}
    for(new i=0; i<2; i++){if(Bullbars[i][0]==componentid) { return 19; }}
    return 0;
    }

    hir OnVehicleMod..:
    Spoiler anzeigen
    public OnVehicleMod(playerid,vehicleid,componentid)
    {
    if(pAutoInfo[playerid][Carid]==GetPlayerVehicleID(playerid))
    {
    new mod=GetModType(componentid);
    switch(mod)
    {
    case 1: {pAutoInfo[playerid][modspoiler]=componentid;}
    case 2: {pAutoInfo[playerid][modnitro]=componentid;}
    case 3: {pAutoInfo[playerid][modwheels]=componentid;}
    case 4: {pAutoInfo[playerid][modlights]=componentid;}
    case 5: {pAutoInfo[playerid][modhood]=componentid;}
    case 6: {pAutoInfo[playerid][modexhaust]=componentid;}
    case 7: {pAutoInfo[playerid][modhydrau]=componentid;}
    case 8: {pAutoInfo[playerid][modroof]=componentid;}
    case 9: {pAutoInfo[playerid][modstereo]=componentid;}
    case 10: {pAutoInfo[playerid][modfrontbumper]=componentid;}
    case 11: {pAutoInfo[playerid][modrearfumper]=componentid;}
    case 12: {pAutoInfo[playerid][modventsr]=componentid;}
    case 13: {pAutoInfo[playerid][modventsl]=componentid;}
    case 14: {pAutoInfo[playerid][modsideskirtr]=componentid;}
    case 15: {pAutoInfo[playerid][modsideskirtl]=componentid;}
    case 16: {pAutoInfo[playerid][modbullbar]=componentid;}
    case 17: {pAutoInfo[playerid][modrearbullbars]=componentid;}
    case 18: {pAutoInfo[playerid][modfrontbullbars]=componentid;}
    case 19: {pAutoInfo[playerid][modbullbars]=componentid;}
    default: { new string[128]; format(string,128,"Unbekannte Komponentenid: %i",componentid); print(string); }
    }
    SaveAuto(playerid);
    }
    return 1;
    }

    hir speichern und laden:
    Spoiler anzeigen

    stock loadCar(playerid)
    {
    GetPlayerName(playerid, pAutoInfo[playerid][sName], MAX_PLAYER_NAME);
    pAutoInfo[playerid][pKey] = mysql_GetInt("cars", "Key", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][pAUTOPoS_X] = mysql_GetFloat("cars", "AutoX", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][pAUTOPoS_Y] = mysql_GetFloat("cars", "AutoY", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][pAUTOPoS_Z] = mysql_GetFloat("cars", "AutoZ", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][pAUTOPoS_A] = mysql_GetFloat("cars", "AutoA", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][ModelID] = mysql_GetInt("cars", "ModelID", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][Farbe1] = mysql_GetInt("cars", "Farbe1", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][Farbe2] = mysql_GetInt("cars", "Farbe2", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][Preis] = mysql_GetInt("cars", "VKPreis", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][reppreis] = mysql_GetInt("cars", "ReparaturPreis", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][spaintjobid] = mysql_GetInt("cars", "PaintJob", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modspoiler] = mysql_GetInt("cars", "Spoiler", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modnitro] = mysql_GetInt("cars", "Nitro", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modwheels] = mysql_GetInt("cars", "Wheels", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modlights] = mysql_GetInt("cars", "Lights", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modhood] = mysql_GetInt("cars", "MotorHaube", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modexhaust] = mysql_GetInt("cars", "Auspuff", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modhydrau] = mysql_GetInt("cars", "Hydraulic", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modroof] = mysql_GetInt("cars", "AutoDach", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modstereo] = mysql_GetInt("cars", "Stereo", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modfrontbumper] = mysql_GetInt("cars","Frontstossstange", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modrearfumper] = mysql_GetInt("cars","Heckstossstange", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modventsl] = mysql_GetInt("cars","VentsLinks", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modventsr] = mysql_GetInt("cars","VentsRechts", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modsideskirtr] = mysql_GetInt("cars","SchwellerleistenRechts", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modsideskirtl] = mysql_GetInt("cars","SchwellerleistenLinks", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modbullbar] = mysql_GetInt("cars","BullBar", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modrearbullbars] = mysql_GetInt("cars","rearbullbars", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modfrontbullbars] = mysql_GetInt("cars","frontbullbars", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modbullbars] = mysql_GetInt("cars","Stossstangen", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][Carid] = CreateVehicle(pAutoInfo[playerid][ModelID],pAutoInfo[playerid][pAUTOPoS_X],pAutoInfo[playerid][pAUTOPoS_Y],pAutoInfo[playerid][pAUTOPoS_Z],pAutoInfo[playerid][pAUTOPoS_A],pAutoInfo[playerid][Farbe1],pAutoInfo[playerid][Farbe2],-1);
    ChangeVehiclePaintjob(pAutoInfo[playerid][Carid],pAutoInfo[playerid][spaintjobid]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modspoiler]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modnitro]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modwheels]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modlights]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modhood]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modexhaust]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modhydrau]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modroof]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modstereo]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modfrontbumper]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modrearfumper]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modventsl]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modventsr]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modsideskirtr]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modsideskirtl]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modbullbar]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modrearbullbars]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modfrontbullbars]);
    AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modbullbars]);
    return 1;
    }
    stock SaveAuto(playerid)
    {
    GetPlayerName(playerid, pAutoInfo[playerid][sName], MAX_PLAYER_NAME);
    mysql_SetInt("cars", "Key",pAutoInfo[playerid][pKey], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","VKPreis",pAutoInfo[playerid][Preis], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars", "ReparaturPreis",pAutoInfo[playerid][reppreis], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","ModelID",pAutoInfo[playerid][ModelID], "Name",pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","Farbe1",pAutoInfo[playerid][Farbe1], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","Farbe2",pAutoInfo[playerid][Farbe2], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","Spoiler",pAutoInfo[playerid][modspoiler], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","Nitro",pAutoInfo[playerid][modnitro], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","Wheels",pAutoInfo[playerid][modwheels], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","Lights",pAutoInfo[playerid][modlights], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","MotorHaube",pAutoInfo[playerid][modhood], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","Auspuff",pAutoInfo[playerid][modexhaust], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","Hydraulic",pAutoInfo[playerid][modhydrau], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","AutoDach",pAutoInfo[playerid][modroof], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","Stereo",pAutoInfo[playerid][modstereo], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","Frontstossstange",pAutoInfo[playerid][modfrontbumper], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","Heckstossstange",pAutoInfo[playerid][modrearfumper], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","VentsLinks",pAutoInfo[playerid][modventsl], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","VentsRechts",pAutoInfo[playerid][modventsr], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","SchwellerleistenRechts",pAutoInfo[playerid][modsideskirtr], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","SchwellerleistenLinks",pAutoInfo[playerid][modsideskirtl], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","BullBar",pAutoInfo[playerid][modbullbar], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","rearbullbars",pAutoInfo[playerid][modrearbullbars], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","frontbullbars",pAutoInfo[playerid][modfrontbullbars], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","Stossstangen",pAutoInfo[playerid][modbullbars], "Name", pAutoInfo[playerid][sName]);
    mysql_SetInt("cars","PaintJob",pAutoInfo[playerid][spaintjobid], "Name",pAutoInfo[playerid][sName]);
    mysql_SetFloat("cars", "AutoX",pAutoInfo[playerid][pAUTOPoS_X], "Name", pAutoInfo[playerid][sName]);
    mysql_SetFloat("cars", "AutoY",pAutoInfo[playerid][pAUTOPoS_Y], "Name", pAutoInfo[playerid][sName]);
    mysql_SetFloat("cars", "AutoZ",pAutoInfo[playerid][pAUTOPoS_Z], "Name", pAutoInfo[playerid][sName]);
    mysql_SetFloat("cars", "AutoA",pAutoInfo[playerid][pAUTOPoS_A], "Name", pAutoInfo[playerid][sName]);
    return 1;
    }

    Mit freundlichen Grüßen,


    Fabi.StaR :love::saint:


  • Also SuFu schadet nicht :>

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