26.11.2013, 10:02
pawn Код:
#define MAX_HOUSES 100 // Change this to whatever the largest number of houses you can have on your server is.
stock GetNextHouseID()
{
new file[40];
for(new i = 0; i < MAX_HOUSES; i++)
{
format(file, sizeof(file), "Server\Houses\%d.ini", i); //Replace this with whatever the link to your house files are.
if(fexist(file)) continue;
return i;
}
return -1;
}