20.03.2015, 05:51
Why do you create an array which can hold all vehicle's (2000 of them) while you only save 1 vehicle?
This would do.
The printf statements I added could be used to debug your variables so that you can check if they are filled with proper data before saving.
Other than this, I see no reason why only the panels are saved.
pawn Код:
new VehiclePanels, VehicleDoors, VehicleLights, VehicleTires;
GetVehicleDamageStatus(vehicleid, VehiclePanels, VehicleDoors, VehicleLights, VehicleTires);
printf("Saving vehicle-id: %i", vehicleid);
printf("Panels: %i, Doors: %i, Lights: %i, Tires: %i", VehiclePanels, VehicleDoors, VehicleLights, VehicleTires);
format(line, sizeof(line), "Panels=%d\r\n", VehiclePanels); fwrite(handle, line);
format(line, sizeof(line), "Doors=%d\r\n", VehicleDoors); fwrite(handle, line);
format(line, sizeof(line), "Lights=%d\r\n", VehicleLights); fwrite(handle, line);
format(line, sizeof(line), "Tires=%d\r\n", VehicleTires); fwrite(handle, line);
The printf statements I added could be used to debug your variables so that you can check if they are filled with proper data before saving.
Other than this, I see no reason why only the panels are saved.