07.01.2011, 01:58
You can use this code:
But that will check, whats the next ID of a house. So, you will have to name them like 00.ini, 01.ini and so on...
pawn Code:
stock GetFreeHouseID()
{
new file[128];
for(new h = 0;h < 800; h++)
{
format(file, sizeof(file), "/Houses/%d.ini", h); // You will have to rename this to your own file destination
if(!dini_Exists(file))
{
return h;
}
}
return -1;
}

