21.02.2011, 10:45
Well I suspect that the vehicles are destroyed by the server too quickly to gather the required information for each player. Although I'm not sure about that, so lets do some debugging to be 100% sure:
Add the print into the code like I did.
pawn Код:
if(dini_Exists(file))
{
new Float:Healthh, Float:angl;
GetVehicleHealth(CarOwner[playerid],Healthh);
GetVehicleZAngle(CarOwner[playerid],angl);
GetVehiclePos(CarOwner[playerid],x,y,z);
printf("CarOwner: %d | Health: %f | X: %f | Y: %f | Z: %f | A: %f",CarOwner[playerid],Healthh,x,y,z,angl); // Add this line.
dini_IntSet(file,"LastID", CarOwner[playerid]);
dini_IntSet(file,"CModel", CarInfo[CarOwner[playerid]][CModel]);
dini_FloatSet(file,"PosX", x);
dini_FloatSet(file,"PosY", y);
dini_FloatSet(file,"PosZ", z);
dini_FloatSet(file,"Angle", angl);
dini_FloatSet(file,"Health", Healthh);
DestroyVehicle(CarOwner[playerid]);
}