24.03.2010, 18:40
Hey Guys,
I have a problem with the IDs to save cars into MYSQL
with this art the server put in 4999 cars into the SQL Database
can anyone help me
-Dedi
I have a problem with the IDs to save cars into MYSQL
with this art the server put in 4999 cars into the SQL Database
Код:
for(new count = 1; count < MAX_VEHICLES; 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); } }
-Dedi