Beiträge von Dark Leary

    Das kommt in der log


    Hi ich will versuchen, das die Tabelle über den Script erstellt wird...
    aber sie wird nicht erstellt...


    mein code:

    new string[1629] = "DROP TABLE IF EXISTS `accounts`;";
    strcat(string,"CREATE TABLE `accounts` (");
    strcat(string,"`id` int(11) NOT NULL AUTO_INCREMENT,");
    strcat(string,"`Name` varchar(24) NOT NULL,");
    strcat(string,"`Level` int(11) NOT NULL DEFAULT '1',");
    strcat(string,"`Geld` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Skin` int(11) NOT NULL DEFAULT '137',");
    strcat(string,"`Member` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Job` float NOT NULL DEFAULT '100',");
    strcat(string,"`Job Zeit` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Leader` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`FrakRank` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Adminlevel` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Supporter` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Ban` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Fuehrerschein` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Personalausweis` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Wantedlevel` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Krankenversicherung` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Verwarnungen` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Geschlecht` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Waffenschein` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Lunch` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Angelschein` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`iPod` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Fraktionsname` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Bank` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Geburtsjahr` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Jailtime` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Wanteds` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`Gestorben` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`PTX` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`PTY` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`PTZ` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`NextPayday` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"`ErsterLog` int(11) NOT NULL DEFAULT '0',");
    strcat(string,"PRIMARY KEY (`id`)");
    strcat(string,") ENGINE=MyISAM AUTO_INCREMENT=220 DEFAULT CHARSET=latin1;");
    mysql_query(string);

    Hey benutze das Autohaus von Kaliber
    aber wíe kann ich Farbe und Tuining speichern lassen?


    Speichertart:

    stock LoadVehicels(playerid)
    {
    new arrCoords[30][64];
    new strFromFile2[256];
    new string[256], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string),"/Autohaus/%s.ini",name);
    if(!fexist(string)) return 1;
    new File: file = fopen(string, io_read);
    if (file)
    {
    fread(file, strFromFile2);
    split(strFromFile2, arrCoords, ',');
    CarInfo[playerid][pX] = floatstr(arrCoords[0]);
    CarInfo[playerid][pY] = floatstr(arrCoords[1]);
    CarInfo[playerid][pZ] = floatstr(arrCoords[2]);
    CarInfo[playerid][pA] = floatstr(arrCoords[3]);
    CarInfo[playerid][pFarbe1] = strval(arrCoords[4]);
    CarInfo[playerid][pFarbe2] = strval(arrCoords[5]);
    CarInfo[playerid][pModel] = strval(arrCoords[6]);
    CarInfo[playerid][pPreis] = strval(arrCoords[7]);
    strmid(CarInfo[playerid][pOwner], name, 0, strlen(name), 255);
    new str[128];
    format(str, sizeof(str),"%s",name);
    CarInfo[playerid][pKey] = CreateVehicle(CarInfo[playerid][pModel],CarInfo[playerid][pX],CarInfo[playerid][pY],CarInfo[playerid][pZ],CarInfo[playerid][pA],CarInfo[playerid][pFarbe1],CarInfo[playerid][pFarbe2],-1);
    SetVehicleNumberPlate(CarInfo[playerid][pKey],str);
    SetVehicleToRespawn(CarInfo[playerid][pKey]);
    fclose(file);
    }
    return 1;
    }
    stock Umschreiben(old, neu)
    {
    CarInfo[neu][pX] = CarInfo[old][pX];
    CarInfo[neu][pY] = CarInfo[old][pY];
    CarInfo[neu][pZ] = CarInfo[old][pZ];
    CarInfo[neu][pA] = CarInfo[old][pA];
    CarInfo[neu][pModel] = CarInfo[old][pModel];
    CarInfo[neu][pFarbe1] = CarInfo[old][pFarbe1];
    CarInfo[neu][pFarbe2] = CarInfo[old][pFarbe2];
    CarInfo[neu][pPreis] = CarInfo[old][pPreis];
    new string[256];
    format(string, sizeof(string),"%f, %f, %f, %f, %d, %d, 0, 0, %d, %d",CarInfo[neu][pX],CarInfo[neu][pY],CarInfo[neu][pZ],CarInfo[neu][pA],CarInfo[neu][pFarbe1],CarInfo[neu][pFarbe2],GetVehicleModel(GetPlayerVehicleID(neu)),CarInfo[neu][pPreis]);
    SaveVehicles(string, neu);


    CarInfo[old][pX] = 0;
    CarInfo[old][pY] = 0;
    CarInfo[old][pZ] = 0;
    CarInfo[old][pA] = 0;
    CarInfo[old][pModel] = 0;
    CarInfo[old][pFarbe1] = 0;
    CarInfo[old][pFarbe2] = 0;
    CarInfo[old][pPreis] = 0;
    DeleteVehicle(old);
    }
    stock SaveVehicles(string[],playerid)
    {
    new entry[256],str[256],name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, sizeof(str),"/Autohaus/%s.ini",name);
    format(entry, sizeof(entry), "%s\n",string);
    new File:hFile;
    hFile = fopen(str, io_write);
    fwrite(hFile, entry);
    fclose(hFile);
    }