Now the FS vehicles don't appear at all!
Here's my OnFSInit:
pawn Код:
public OnFilterScriptInit()
{
SetTimer("LoadVehicles();", 300, 0);
return 1;
}
And here's my LoadVehicles callback!
pawn Код:
stock LoadVehicles()
{
for(new i = 0; i < MAX_BUYABLE_VEH; ++i)
{
new
vFile[15];
format(vFile, sizeof(vFile), "vehicles/%d.ini", i);
if(INI_Exist(vFile))
{
INI_Open(vFile);
print("\n=============================================================\n");
vInfo[i][vModel] = INI_ReadInt("Model"); printf("Model:\t\t%i", vInfo[i][vModel]);
vInfo[i][vColor1] = INI_ReadInt("Color1"); printf("Color 1:\t%i", vInfo[i][vColor1]);
vInfo[i][vColor2] = INI_ReadInt("Color2"); printf("Color 2:\t%i", vInfo[i][vColor2]);
vInfo[i][vPrice] = INI_ReadInt("Price"); printf("Price:\t\t$%i", vInfo[i][vPrice]);
INI_ReadString(vInfo[i][vOwner], "Owner", 24); printf("Owner:\t\t%s", vInfo[i][vOwner]);
vInfo[i][vPosX] = INI_ReadFloat("vPosX"); printf("Spawn X:\t%f", vInfo[i][vPosX]);
vInfo[i][vPosY] = INI_ReadFloat("vPosY"); printf("Spawn Y:\t%f", vInfo[i][vPosY]);
vInfo[i][vPosZ] = INI_ReadFloat("vPosZ"); printf("Spawn Z:\t%f", vInfo[i][vPosZ]);
vInfo[i][vPosA] = INI_ReadFloat("vPosA"); printf("Spawn A:\t%f", vInfo[i][vPosA]);
INI_ReadString(vInfo[i][vPlate], "Plate", 32); printf("Plate:\t\t%s", vInfo[i][vPlate]);
vInfo[i][vPaintJ] = INI_ReadInt("PaintJ"); printf("PaintJ:\t\t%i", vInfo[i][vPaintJ]);
vInfo[i][vLocked] = INI_ReadInt("Locked"); printf("Locked:\t\t%i", vInfo[i][vLocked]);
vMods[i][0] = INI_ReadInt("vMod1"); printf("Mod 1:\t\t%i", vMods[i][0]);
vMods[i][1] = INI_ReadInt("vMod2"); printf("Mod 2:\t\t%i", vMods[i][1]);
vMods[i][2] = INI_ReadInt("vMod3"); printf("Mod 3:\t\t%i", vMods[i][2]);
vMods[i][3] = INI_ReadInt("vMod4"); printf("Mod 4:\t\t%i", vMods[i][3]);
vMods[i][4] = INI_ReadInt("vMod5"); printf("Mod 5:\t\t%i", vMods[i][4]);
vMods[i][5] = INI_ReadInt("vMod6"); printf("Mod 6:\t\t%i", vMods[i][5]);
vMods[i][6] = INI_ReadInt("vMod7"); printf("Mod 7:\t\t%i", vMods[i][6]);
vMods[i][7] = INI_ReadInt("vMod8"); printf("Mod 8:\t\t%i", vMods[i][7]);
vMods[i][8] = INI_ReadInt("vMod9"); printf("Mod 9:\t\t%i", vMods[i][8]);
vMods[i][9] = INI_ReadInt("vMod10"); printf("Mod 10:\t\t%i", vMods[i][9]);
vMods[i][10] = INI_ReadInt("vMod11"); printf("Mod 11:\t\t%i", vMods[i][10]);
vMods[i][11] = INI_ReadInt("vMod12"); printf("Mod 12:\t\t%i", vMods[i][11]);
print("\n=============================================================\n");
new
vCarID = CreateVehicle(vInfo[i][vModel], vInfo[i][vPosX], vInfo[i][vPosY], vInfo[i][vPosZ], vInfo[i][vPosA], vInfo[i][vColor1], vInfo[i][vColor2], 500000);
SetVehicleNumberPlate(vCarID, vInfo[i][vPlate]);
ChangeVehiclePaintjob(vCarID, vInfo[i][vPaintJ]);
for(new iMod = 0; iMod < MAX_VEH_MODS; ++iMod)
{
if(vMods[vCarID][iMod] > 0)
{
AddVehicleComponent(vCarID, vMods[vCarID][iMod]);
}
}
OwnedVeh(vCarID) = i;
++ Total_Veh_Created;
INI_Close();
}
}
printf("** A total of: \"%i\" vehicle(s) were loaded!", Total_Veh_Created);
print("\n=============================================================");
print("Dynamic Vehicle Ownership By: [U]214 - .INI Version Loaded...");
print("=============================================================\n");
return 1;
}