Fehler MySql_Auto System..

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
  • Gutentag liebe Community....


    Ich habe ein fehler und zwar wollte ich ein Auto System machen...
    Doch es klappt nicht wie ich es mir gedacht habe...
    Wenn ich das Script mit dem system drauf habe... dann steht bei Gamemode 'Unknown' Doch mann kann
    drauf Joinen und spielen...




    Wäre nett wenn mir einer helfen könnte ...
    Und in den Logs kommt "[00:55:07] [LOAD] PrivatWagen(1) geladen | Besitzer: x�d"

    stock LoadPrivatAutos()
    {
    new string[15],
    vehicleid = 1;
    while(vehicleid < MAX_PRIVAT_CARS)
    {
    format(string, sizeof(string), "%d", vehicleid);



    format(CarInfo[vehicleid][cBesitzer], MAX_11_LENGH, mysql_GetString("PrivatCars", "Besitzer", "ID", string));


    CarInfo[vehicleid][cModel] = mysql_GetInt("PrivatCars","Model","ID",string);
    CarInfo[vehicleid][cTank] = mysql_GetInt("PrivatCars", "Tank", "ID", string);//privat Car Tank 1
    CarInfo[vehicleid][cSchaden] = mysql_GetInt("PrivatCars", "Schaden", "ID", string);//privat Car Tank


    CarInfo[vehicleid][cPosX] = mysql_GetFloat("PrivatCars", "PosX", "ID", string);//privat Car Tank
    CarInfo[vehicleid][cPosY] = mysql_GetFloat("PrivatCars", "PosY", "ID", string);//privat Car Tank
    CarInfo[vehicleid][cPosZ] = mysql_GetFloat("PrivatCars", "PosZ", "ID", string);//privat Car Tank
    CarInfo[vehicleid][cPosA] = mysql_GetFloat("PrivatCars", "PosA", "ID", string);//privat Car Tank
    CarInfo[vehicleid][cSpritart] = mysql_GetInt("PrivatCars", "Spritart", "ID", string);//privat Car Tank
    CarInfo[vehicleid][cKM] = mysql_GetInt("PrivatCars", "KM", "ID", string);//privat Car Tank

    CarInfo[vehicleid][cKFDrogen] = mysql_GetInt("PrivatCars", "KFDrogen", "ID", string);//privat Car Tank
    CarInfo[vehicleid][cKFMats] = mysql_GetInt("PrivatCars", "KFMats", "ID", string);//privat Car Tank
    CarInfo[vehicleid][cKFLunchboxen] = mysql_GetInt("PrivatCars", "KFLunchboxen", "ID", string);//privat Car Tank
    CarInfo[vehicleid][cKFWaffe1] = mysql_GetInt("PrivatCars", "KFWaffe1", "ID", string);//privat Car Tank
    CarInfo[vehicleid][cKFWaffe2] = mysql_GetInt("PrivatCars", "KFWaffe2", "ID", string);//privat Car Tank
    CarInfo[vehicleid][cKFWaffe3] = mysql_GetInt("PrivatCars", "KFWaffe3", "ID", string);//privat Car Tank

    CarInfo[vehicleid][cColor2] = mysql_GetInt("PrivatCars", "Lack1", "ID", string);//privat Car Tank1
    CarInfo[vehicleid][cColor1] = mysql_GetInt("PrivatCars", "Lack2", "ID", string);//privat Car Tank1
    CarInfo[vehicleid][cLock] = mysql_GetInt("PrivatCars", "Abgeschlossen", "ID", string);//privat Car Tank1


    SetVehicleNumberPlate(CreateVehicle(CarInfo[vehicleid][cModel],CarInfo[vehicleid][cPosX],CarInfo[vehicleid][cPosY],CarInfo[vehicleid][cPosZ],CarInfo[vehicleid][cPosA],CarInfo[vehicleid][cColor1],CarInfo[vehicleid][cColor2], -1), "xD");
    printf("[LOAD] PrivatWagen(%d) geladen | Besitzer: %s",vehicleid,CarInfo[vehicleid][cBesitzer]);
    vehicleid++;


    if(CarInfo[vehicleid][cLock] == 1) { Lock[vehicleid] = 1; }
    else { Lock[vehicleid] = 0; }
    }
    return 1;
    }
    stock SavePrivatAutos()
    {
    new string[15],
    vehicleid = 1;
    while(vehicleid < MAX_PRIVAT_CARS)
    {
    format(string, sizeof(string), "%d", vehicleid);
    mysql_SetInt("PrivatCars", "Tank", CarInfo[vehicleid][cTank], "ID", string);
    mysql_SetString("PrivatCars","Kennzeichen",CarInfo[vehicleid][cKennzeichen],"ID",string);
    mysql_SetString("PrivatCars","Besitzer",CarInfo[vehicleid][cBesitzer],"ID",string);


    mysql_SetInt("PrivatCars", "Lack1", CarInfo[vehicleid][cColor1], "ID", string);
    mysql_SetInt("PrivatCars", "Lack2", CarInfo[vehicleid][cColor2], "ID", string);
    mysql_SetInt("PrivatCars", "Abgeschlossen", CarInfo[vehicleid][cLock], "ID", string);

    mysql_SetFloat("PrivatCars", "PosX", CarInfo[vehicleid][cPosX], "ID", string);
    mysql_SetFloat("PrivatCars", "PosY", CarInfo[vehicleid][cPosY], "ID", string);
    mysql_SetFloat("PrivatCars", "PosZ", CarInfo[vehicleid][cPosZ], "ID", string);
    mysql_SetFloat("PrivatCars", "PosA", CarInfo[vehicleid][cPosA], "ID", string);
    mysql_SetInt("PrivatCars", "Model", CarInfo[vehicleid][cModel], "ID", string);//cKFDrogen



    mysql_SetInt("PrivatCars", "KFDrogen", CarInfo[vehicleid][cKFDrogen], "ID", string);
    mysql_SetInt("PrivatCars", "KFMats", CarInfo[vehicleid][cKFMats], "ID", string);
    mysql_SetInt("PrivatCars", "KFLunchboxen", CarInfo[vehicleid][cKFLunchboxen], "ID", string);
    mysql_SetInt("PrivatCars", "KFWaffe1", CarInfo[vehicleid][cKFWaffe1], "ID", string);
    mysql_SetInt("PrivatCars", "KFWaffe2", CarInfo[vehicleid][cKFWaffe2], "ID", string);
    mysql_SetInt("PrivatCars", "KFWaffe3", CarInfo[vehicleid][cKFWaffe3], "ID", string);


    printf("[SAVE] PrivatAuto '%s'(%d) gespeichert | Besitzer: %s.", CarInfo[vehicleid][cKennzeichen],vehicleid,CarInfo[vehicleid][cBesitzer]);
    vehicleid++;
    }
    return 1;
    }