Hi Leutz,
ich habe in problem mit dem Speichern von Fahrzeugen in MYSQL
bei dini konnte ich das problem los mit count machen jedoch bei MYSQL habe ich ein problem
SCM(playerid,COLOR_GREEN,"/////////////////////////////////////////////////");
SCM(playerid,COLOR_LIGHTRED," Auto erstellt ");
SCM(playerid,COLOR_GREEN,"/////////////////////////////////////////////////");
GPP(playerid,Float:isx,Float:isy,Float:isz);
if (QueryMySQL("*","autos","","")>0)
{
while(mysql_fetch_row(mysqlresult))
{
new count = GetMySQLField_Int("FahrzeugID");
count++;
Autos[count][vModel] = modelid;
Autos[count][vEingepackt] = 0;
Autos[count][vArt] = 0;
Autos[count][vX] = isx;
Autos[count][vY] = isy;
Autos[count][vZ] = isz;
Autos[count][vA] = 0;
Autos[count][vFarbe1] = 0;
Autos[count][vFarbe2] = 0;
Autos[count][vVerkauf] = 0;
Autos[count][vPreis] = 0;
Autos[count][vKMStand] = 0;
Autos[count][vRKMStand] = 0;
strmid(Autos[count][vBesitzer], "Niemand", 0, strlen("Niemand"), 255);
strmid(Autos[count][vSch1], "Niemand", 0, strlen("Niemand"), 255);
strmid(Autos[count][vSch2], "Niemand", 0, strlen("Niemand"), 255);
strmid(Autos[count][vSch3], "Niemand", 0, strlen("Niemand"), 255);
Autos[count][vBeschlagnahmt] = 0;
Autos[count][vBX] = isx;
Autos[count][vBY] = isy;
Autos[count][vBZ] = isz;
Autos[count][vBA] = 0;
Autos[count][vRespawn] = respawn;
Autos[count][vZustand] = 1000.0;
Autos[count][vMS] = 0;
Autos[count][vTankMax] = 100;
Autos[count][vBenzin] = 100;
Autos[count][vVW] = vw;
Autos[count][vMJ] = mj;
Autos[count][vFC] = fc;
// Autos[count][vTankMax] = LVehiclesTreibstoffMenge[modelid-400];
// Autos[count][vBenzin] = LVehiclesTreibstoff[modelid-400];
Autos[count][vTankDrin] = 100;
format (mystr,sizeof(mystr),"Model='%d'",Autos[count][vModel]);
if (!InsertMySQL("autos",mystr)) {printf("Daten konnten nicht eingefügt werden!");}
VgasDrin[count] = Autos[count][vTankMax];
VgasMax[count] = Autos[count][vTankMax];
Meters[count] = 0;
RMeters[count] = 0;
CreateVehicle(modelid,isx,isy,isz,0,0,0,respawn);
SetVehicleVirtualWorld(count,Autos[count][vVW]);
OnVehicleDataUpdate(count);
}
}
mfg Dedi