10.12.2010, 16:27
Try.:
pawn Code:
public
SacuvajVozila()
{
new
idx = 0,
File:file2 = fopen("VozilaOwnership.cfg", io_write); // io_write
if(file2)
{
new
coordsstring[256];
while(idx < sizeof(Vozilo)) // Loop 64 0. - 63.
{
format(coordsstring, sizeof(coordsstring), "%d,%f,%f,%f,%f,%d,%d,%s,%s,%d,%d\r\n", // \r\n new line
Vozilo[idx][hModel],
Vozilo[idx][hPozX],
Vozilo[idx][hPozY],
Vozilo[idx][hPozZ],
Vozilo[idx][hPozA],
Vozilo[idx][hBoja1],
Vozilo[idx][hBoja2],
Vozilo[idx][hVlasnik],
Vozilo[idx][hOpis],
Vozilo[idx][hCena],
Vozilo[idx][hImaVlasnika]);
fwrite(file2, coordsstring);
idx++;
}
fclose(file2); // Close the opened file
}
return 1;
}

