Beiträge von Fabi.StaR

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

    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

    ocmd:gotokord(playerid,params[])
    {
    if(PlayerInfo[playerid][pAdminLevel] <= 5)return SendClientMessage(playerid,Rot,"[Info]: Du bist kein Admin!");
    new Float:kord[3];
    if(sscanf(params,"fff",kord[0],kord[1],kord[2]))return SendClientMessage(playerid,Gelb,"[Benutze]: /gotokord [x] [y] [z]");
    SetPlayerPos(playerid,kord[0],kord[1],kord[2]);
    formatEx(playerid,Gelb,"Du hast dich zu den Koordinaten %f, %f, %f geportet",kord[0],kord[1],kord[2]);
    return 1;
    }


    Hir ich gebe dir meinen

    Die Tuningteile werden in der datenbank zwar gespeichert aber beim laden sollten die eigentlich ans fahrzeug ran aber es funzt net ;


    hir der stock 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][spaintjobid] = mysql_GetInt("cars", "PaintJob", "Name", pAutoInfo[playerid][sName]);
    pAutoInfo[playerid][modspoiler] = mysql_GetInt("cars", "Spoiler", "Name", pAutoInfo[playerid][sName]);// wird geladen
    pAutoInfo[playerid][modnitro] = mysql_GetInt("cars", "Nitro", "Name", pAutoInfo[playerid][sName]);// wird geladen
    pAutoInfo[playerid][modwheels] = mysql_GetInt("cars", "Wheels", "Name", pAutoInfo[playerid][sName]);// wird geladen
    pAutoInfo[playerid][modlights] = mysql_GetInt("cars", "Lights", "Name", pAutoInfo[playerid][sName]);// wird geladen
    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);
    if(pAutoInfo[playerid][spaintjobid]!=-1) {ChangeVehiclePaintjob(pAutoInfo[playerid][Carid],pAutoInfo[playerid][spaintjobid]);}
    if(pAutoInfo[playerid][modspoiler]!=-1) {AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modspoiler]);}// hir
    if(pAutoInfo[playerid][modnitro]!=-1) {AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modnitro]);} // hir
    if(pAutoInfo[playerid][modwheels]!=-1) {AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modwheels]);} // hir
    if(pAutoInfo[playerid][modlights]!=-1) {AddVehicleComponent(pAutoInfo[playerid][Carid],pAutoInfo[playerid][modlights]);}// hir
    printf("--> Das Fahrzeug von %s wurde erfolgreich von der MySQL Datenbak geladen.", pAutoInfo[playerid][sName]);
    return 1;
    }


    Komischer weisse geht ChangeVehiclePaintjob.


    aber die Tuningteile wie z.B. Spoiler geht net ;(


    Dank im vorraus.


    mfg. Fabi.StaR

    Guten Abend,


    Ich bekomme 4 Errors aber warum hir der Code:


    Spoiler anzeigen
    GetModType(componentid)
    {
    new i;
    for(i=0; i<20; i++)
    {
    if(spoiler[i][0]==componentid){ return 1; }
    }
    for(i=0; i<3; i++)
    {
    if(nitro[i][0]==componentid){ return 2; }
    }
    for(i=0; i<17; i++)
    {
    if(wheels[i][0]==componentid){ return 3; }
    }
    for(i=0; i<2; i++)
    {
    if(lights[i][0]==componentid){ return 4; }
    }
    return 0;
    }
    new wheels[17][0] = {
    {1025},{1073},{1074},
    {1075},{1076},{1077},
    {1078},{1079},{1080},
    {1081},{1082},{1083},
    {1084},{1085},{1096},
    {1097},{1098}
    };

    Spoiler anzeigen
    new spoiler[20][0] = {
    {1000},{1001},{1002},
    {1003},{1014},{1015},
    {1016},{1023},{1058},
    {1060},{1049},{1050},
    {1138},{1139},{1146},
    {1147},{1158},{1162},
    {1163},{1164}
    };

    Spoiler anzeigen
    new nitro[3][0] = {
    {1008},{1009},{1010}
    };
    new lights[2][0] = {
    {1013},{1024}
    };


    ihr die errors:


    SQL
    C:\Users\Fabian\Desktop\Mein Deaht Match Server - Kopie\gamemodes\mysqlautohaus.pwn(643) : error 017: undefined symbol "spoiler"C:\Users\Fabian\Desktop\Mein Deaht Match Server - Kopie\gamemodes\mysqlautohaus.pwn(647) : error 017: undefined symbol "nitro"C:\Users\Fabian\Desktop\Mein Deaht Match Server - Kopie\gamemodes\mysqlautohaus.pwn(651) : error 017: undefined symbol "wheels"C:\Users\Fabian\Desktop\Mein Deaht Match Server - Kopie\gamemodes\mysqlautohaus.pwn(655) : error 017: undefined symbol "lights"Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase4 Errors.


    Dank im vorraus


    mfg. Fabi.StaR


    //CLOSE hab es erraus gefunden

    Zeile (58825) : Variable wird nie benutzt: "LSBC"
    Zeile (58825) : Variable wird nie benutzt: "RMVehs"
    Zeile (58825) : Variable wird nie benutzt: "RSVehs"
    Zeile (58825) : Variable wird nie benutzt: "RifaVehs"
    Zeile (58825) : Variable wird nie benutzt: "TerrorVehs"
    Zeile (58825) : Variable wird nie benutzt: "VagosVehs"



    Wenn man Vehicles erstellt sollte man auc hwissen wie man sie im script verwändet. :)


    Aber mach mal gantz oben im script:


    new RMVehs[100], RSVehs[100],RifaVehs[100],TerrorVehs[100],VagosVehs[100];


    dann bekommst du auch keine Errors mehr.