Sziasztok!
Lenne egy olyan problémám hogy nem olvassa be a jármûveket. Mi lehet a gond??
stock LoadCar()
{
for(new idx = 200; idx < sizeof(CarInfo); idx++)
{
new vFile[30];
format(vFile, sizeof(vFile), \"cfg-k/kocsik.ini\", idx);
if(INI_Exist(vFile))
{
INI_Open(vFile);
CarInfo[idx][cModel] = INI_ReadInt(\"Model\");
CarInfo[idx][cLocationx] = INI_ReadFloat(\"Locationx\");
CarInfo[idx][cLocationy] = INI_ReadFloat(\"Locationy\");
CarInfo[idx][cLocationz] = INI_ReadFloat(\"Locationz\");
CarInfo[idx][cAngle] = INI_ReadFloat(\"Angle\");
CarInfo[idx][cColorOne] = INI_ReadInt(\"ColorOne\");
CarInfo[idx][cColorTwo] = INI_ReadInt(\"ColorTwo\");
INI_ReadString(CarInfo[idx][cOwner], \"Owner\", 24);
INI_ReadString(CarInfo[idx][cDescription], \"Description\", 24);
CarInfo[idx][cValue] = INI_ReadInt(\"Value\");
CarInfo[idx][cLicense] = INI_ReadInt(\"License\");
CarInfo[idx][cOwned] = INI_ReadInt(\"Owned\");
CarInfo[idx][cLock] = INI_ReadInt(\"Lock\");
INI_ReadString(CarInfo[idx][cRendszam], \"Rendszam\", 32);
CarInfo[idx][cRendszamVane] = INI_ReadInt(\"RendszamVane\");
CarInfo[idx][cKerek] = INI_ReadInt(\"Kerek\");
CarInfo[idx][cPaintjob] = INI_ReadInt(\"Paintjob\");
CarInfo[idx][cKinezet1] = INI_ReadInt(\"Kinezet1\");
CarInfo[idx][cKinezet2] = INI_ReadInt(\"Kinezet2\");
CarInfo[idx][cKinezet3] = INI_ReadInt(\"Kinezet3\");
CarInfo[idx][cKinezet4] = INI_ReadInt(\"Kinezet4\");
CarInfo[idx][cKinezet5] = INI_ReadInt(\"Kinezet5\");
CarInfo[idx][cKinezet6] = INI_ReadInt(\"Kinezet6\");
CarInfo[idx][cKinezet7] = INI_ReadInt(\"Kinezet7\");
CarInfo[idx][cKinezet8] = INI_ReadInt(\"Kinezet8\");
CarInfo[idx][cKinezet9] = INI_ReadInt(\"Kinezet9\");
CarInfo[idx][cKinezet10] = INI_ReadInt(\"Kinezet10\");
CarInfo[idx][cNitro] = INI_ReadInt(\"Nitro\");
CarInfo[idx][cHidraulika] = INI_ReadInt(\"Hidraulika\");
CarInfo[idx][cVan] = INI_ReadInt(\"Van\");
new string[20];
format(string, sizeof(string), \"LV-%d\", idx);
SetVehicleNumberPlate(idx, string);
printf(\"JarmuID: %d Tulaj: %s Rendszam: %s\",idx,CarInfo[idx][cOwner],CarInfo[idx][cRendszam]);
format(string, sizeof(string), \"LV-%d\", idx);
SetVehicleNumberPlate(idx, string);
INI_Close();
}
}
return 1;
}
stock SaveCarCoords()
{
for(new idx = 200; idx < sizeof(CarInfo); idx++)
{
new iStr[30];
format(iStr, sizeof(iStr), \"cfg-k/kocsik.ini\", idx);
if(INI_Open(iStr))
{
INI_WriteInt(\"Model\", CarInfo[idx][cModel]);
INI_WriteFloat(\"Locationx\", CarInfo[idx][cLocationx]);
INI_WriteFloat(\"Locationy\", CarInfo[idx][cLocationy]);
INI_WriteFloat(\"Locationz\", CarInfo[idx][cLocationz]);
INI_WriteFloat(\"Angle\", CarInfo[idx][cAngle]);
INI_WriteInt(\"ColorOne\", CarInfo[idx][cColorOne]);
INI_WriteInt(\"ColorTwo\", CarInfo[idx][cColorTwo]);
INI_WriteString(\"Owner\", CarInfo[idx][cOwner]);
INI_WriteString(\"Description\", CarInfo[idx][cDescription]);
INI_WriteInt(\"Value\", CarInfo[idx][cValue]);
INI_WriteInt(\"License\", CarInfo[idx][cLicense]);
INI_WriteInt(\"Owned\", CarInfo[idx][cOwned]);
INI_WriteInt(\"Lock\", CarInfo[idx][cLock]);
INI_WriteString(\"Rendszam\", CarInfo[idx][cRendszam]);
INI_WriteInt(\"RendszamVane\", CarInfo[idx][cRendszamVane]);
INI_WriteInt(\"Kerek\", CarInfo[idx][cKerek]);
INI_WriteInt(\"Paintjob\", CarInfo[idx][cPaintjob]);
INI_WriteInt(\"Kinezet1\", CarInfo[idx][cKinezet1]);
INI_WriteInt(\"Kinezet2\", CarInfo[idx][cKinezet2]);
INI_WriteInt(\"Kinezet3\", CarInfo[idx][cKinezet3]);
INI_WriteInt(\"Kinezet4\", CarInfo[idx][cKinezet4]);
INI_WriteInt(\"Kinezet5\", CarInfo[idx][cKinezet5]);
INI_WriteInt(\"Kinezet6\", CarInfo[idx][cKinezet6]);
INI_WriteInt(\"Kinezet7\", CarInfo[idx][cKinezet7]);
INI_WriteInt(\"Kinezet8\", CarInfo[idx][cKinezet8]);
INI_WriteInt(\"Kinezet9\", CarInfo[idx][cKinezet9]);
INI_WriteInt(\"Kinezet10\", CarInfo[idx][cKinezet10]);
INI_WriteInt(\"Nitro\", CarInfo[idx][cNitro]);
INI_WriteInt(\"Hidraulika\", CarInfo[idx][cHidraulika]);
INI_WriteInt(\"Van\", CarInfo[idx][cVan]);
INI_Save();
INI_Close();
}
}
return 1;
}