30.05.2011, 06:30
Have something like this:
I don't know much about your code, but you'll get the idea behind it.
pawn Код:
stock LoadHouses() // Under OnGameModeInit
{
for(new i = 1; i < MAX_HOUSES; ++i) // MAX_HOUSES define. Change if needed.
{
new
House_File[15];
format(House_File, sizeof(House_File), "%d.ini", i); // This will read the files starting from 1
if(fexist(House_File)) // If the file exists
{
// Use dini to load the info and store it into your global variables.
}
}
return 1;
}
