15.03.2015, 14:39
So I've got this under OnGameModeInit:
This is the LoadVehicles:
And the LoadVehicles_%s:
However, for some reason they don't want to load. It saves them perfectly.
pawn Код:
for(new i = 0; i < MAX_VEHICLES; i++)
{
if(!fexist(VehPath(i))) continue;
LoadVehicles(i);
VehCount++;
}
print("[DEBUG] Vehicles loading..");
pawn Код:
LoadVehicles(veh)
{
INI_ParseFile(VehPath(veh), "LoadVehicles_%s", .bExtra = true, .extra = veh);
for(new i = 0; i < MAX_DVEHICLES; i++)
{
CreateVehicle(VehInfo[i][vModel],VehInfo[i][vX],VehInfo[i][vY],VehInfo[i][vZ],VehInfo[i][vA],VehInfo[i][vC1],VehInfo[i][vC2], 99999);
}
return true;
}
pawn Код:
forward LoadVehicles_Vehicle(vehid,name[],value[]);
public LoadVehicles_Vehicle(vehid,name[],value[])
{
INI_Int("vModel", VehInfo[vehid][vModel]);
INI_Float("vX", VehInfo[vehid][vX]);
INI_Float("vY", VehInfo[vehid][vY]);
INI_Float("vZ", VehInfo[vehid][vZ]);
INI_Float("vA", VehInfo[vehid][vA]);
INI_Int("vJob", VehInfo[vehid][vJob]);
INI_Int("vFaction", VehInfo[vehid][vFaction]);
INI_Int("Color1", VehInfo[vehid][vC1]);
INI_Int("Color2", VehInfo[vehid][vC2]);
INI_Int("vWeed", VehInfo[vehid][vWeed]);
INI_Int("vMoney", VehInfo[vehid][vMoney]);
return true;
}