22.04.2014, 23:46
If you know how many businesses you have or the max amount you can have then you can do something like this:
pawn Код:
#define MAX_BIZ 10
enum b_
{
Float:a,
b,
};
new Biz[MAX_BIZ][b_];
new string[128];
stock LoadBusinesses()
{
for(new i; i < MAX_BIZ; i++)
{
format(string, sizeof(string), "Businesses/Biz_%d", i);
if(fexist(string))
{
INI_ParseFile(string, "LoadBiz", .bExtra = true, .extra = i);
}
}
return 1;
}
forward LoadBiz(i);
public LoadBiz(i)
{
//....
}