02.07.2012, 06:30
Here you have the saving code.
It creates files like this: 0 , 1, 2 ... and then creates a fi,e named 369.
It creates files like this: 0 , 1, 2 ... and then creates a fi,e named 369.
pawn Код:
stock SavePrivVeh(iVehicleID)
{
new
iStr[15];
format(iStr, sizeof(iStr), "Vozila/%d.ini", iVehicleID);
if(INI_Open(iStr))
{
INI_WriteInt("Model", vInfo[iVehicleID][vModel]);
INI_WriteInt("Color1", vInfo[iVehicleID][vColor1]);
INI_WriteInt("Color2", vInfo[iVehicleID][vColor2]);
INI_WriteInt("Price", vInfo[iVehicleID][vPrice]);
INI_WriteString("Owner", vInfo[iVehicleID][vOwner]);
INI_WriteFloat("vPosX", vInfo[iVehicleID][vPosX]);
INI_WriteFloat("vPosY", vInfo[iVehicleID][vPosY]);
INI_WriteFloat("vPosZ", vInfo[iVehicleID][vPosZ]);
INI_WriteFloat("vPosA", vInfo[iVehicleID][vPosA]);
INI_WriteString("Plate", vInfo[iVehicleID][vPlate]);
INI_WriteInt("PaintJ", vInfo[iVehicleID][vPaintJ]);
INI_WriteInt("Locked", vInfo[iVehicleID][vLocked]);
INI_Save();
INI_Close();
}
return 1;
}