27.07.2014, 23:22
pawn Код:
INI_ParseFile(string, "LoadHouses_%d", .bExtra = true, .extra = idx );
pawn Код:
INI_ParseFile(string, "LoadHouses", .bExtra = true, .extra = idx, .bPassTag = true);
Your complete code is:
pawn Код:
public OnGameModeInit()
{
new string[40];
for(new idx = 0; idx < sizeof(HInfo); idx++)
{
format(string, sizeof(string), HOUSE_PATH, idx);
if(!fexist(string)) continue;
INI_ParseFile(string, "LoadHouses", .bExtra = true, .extra = idx, .bPassTag = true);
new labelstring[50];
if(!HInfo[idx][Owned]) format(labelstring, sizeof(labelstring), "Owned: No \nPrice: %i", HInfo[idx][Price]);
else format(labelstring, sizeof(labelstring), "Owned: Yes \n Owner: %s", HInfo[idx][Owner]);
HInfo[idx][HouseLabel] = Create3DTextLabel(labelstring, 0xFF0000FF, HInfo[idx][XPos], HInfo[idx][YPos], HInfo[idx][ZPos], 25.0, HInfo[idx][VirtualWorld]);
}
return 1;
}

