Wanting to delete an id from 0 to 100 then create the deleted id and after its created load from last place?
#3

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;
}
If you don't understand, show us some of the code where you create/load and save houses. Then I will be able to fully make it for you, this is just an example of what it should look like.
Reply


Messages In This Thread
Wanting to delete an id from 0 to 100 then create the deleted id and after its created load from last place? - by jueix - 26.11.2013, 09:54
Re: Wanting to delete an id from 0 to 100 then create the deleted id and after its created load from last place? - by dominik523 - 26.11.2013, 10:01
Re: Wanting to delete an id from 0 to 100 then create the deleted id and after its created load from last place? - by Threshold - 26.11.2013, 10:02

Forum Jump:


Users browsing this thread: 1 Guest(s)