30.12.2013, 21:34
Ahн va
Код:
function UpdateCars() { new idx, File: file2, coordsstring[256]; idx = VV; while (idx < sizeof(CarInfo)) { format(coordsstring, sizeof(coordsstring), "%d,%f,%f,%f,%f,%d,%d,%s,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%s,%d,%d,%d,%d\n", CarInfo[idx][cModel], CarInfo[idx][cLocationx], CarInfo[idx][cLocationy], CarInfo[idx][cLocationz], CarInfo[idx][cAngle], CarInfo[idx][cColorOne], CarInfo[idx][cColorTwo], CarInfo[idx][cOwner], CarInfo[idx][cName], CarInfo[idx][cValue], CarInfo[idx][cOwned], CarInfo[idx][cLock], CarInfo[idx][cBattery], CarInfo[idx][cSpoiler], CarInfo[idx][cHood], CarInfo[idx][cRoof], CarInfo[idx][cSideskirt], CarInfo[idx][cNitro], CarInfo[idx][cLamps], CarInfo[idx][cExhaust], CarInfo[idx][cWheel], CarInfo[idx][cHydraulics], CarInfo[idx][cPaintjob], CarInfo[idx][cFrontBumper], CarInfo[idx][cRearBumper], CarInfo[idx][cVents], CarInfo[idx][cEmbargo], CarInfo[idx][cMulta], CarInfo[idx][cPlate], CarInfo[idx][cGas], CarInfo[idx][cAlarm], CarInfo[idx][cVehTime], CarInfo[idx][cGPS]); if(idx == VV) file2 = fopen("cars.cfg", io_write); else file2 = fopen("cars.cfg", io_append); fwrite(file2, coordsstring); idx++; fclose(file2); } }