15.10.2015, 11:45
What's wrong in these loops? it's just loads everything in the first loop and doesn't load anything for the second one..
the second loop loads successfully if you put it in the first but it will not load the first loop which is the second one now.. !!
the second loop loads successfully if you put it in the first but it will not load the first loop which is the second one now.. !!
PHP код:
stock LoadInteriors()
{
for(new i = 0; i <= MAX_INTERIORS; i++)
{
if(fexist(InteriorFile(i)))
{
INI_ParseFile(InteriorFile(i), "LoadInteriorData", false, true, i, true, false);
InteriorCP[i] = CreateDynamicCP(INTInfo[i][INTCPOutX], INTInfo[i][INTCPOutY], INTInfo[i][INTCPOutZ], 1.5, 0, 0, -1, 20);
// rest of loads...
}
}
for(new i = 0; i <= MAX_INTERIORCPS; i++)
{
if(fexist(InteriorCPFile(i)))
{
INI_ParseFile(InteriorCPFile(i), "LoadInteriorCPData", false, true, i, true, false);
CreateDynamicObject(1559, INTCPInfo[i][INTCPInX],INTCPInfo[i][INTCPInY],INTCPInfo[i][INTCPInZ], 0,0,0,-1 ,-1, -1, 20);
// rest of loads...
}
}
return 1;
}
public OnGameModeInit()
{
DisableInteriorEnterExits();
LoadInteriors();
return 1;
}