30.05.2011, 06:25
Well it's easier to name the files with a number on each of them. Then, when the script loads, you can use a for loop to see if any of the files exist and load them accordingly. Here's what I'm talking about from a house system I started a while ago.
HOME_PATH was equal to something like '\Homes\' and the MAX_HOME was 100. Then houseld just got incremented as each house was loaded so that you could set a maximum amount of homes loaded. That doesn't really matter though. Just the formatting of the house file name and the checking if it exists.
pawn Код:
for(new i; i<MAX_HOME; i++)
{
if(houseld <= MAX_HOME)
{
format(string,22,"%sHouse%d.hou",HOME_PATH,i);
if(dini_Exists(string))
{

