Loading 1 all time when creating new.
#1

Ok. I have a problem, When I create a new ATM it loads 1, So the ATM's ID is always 1 and doesn't change, I want it so that when a player types /addatm it will create an ATM with an ID that hasn't be used for example if he creates 2 ATM's and he deletes ATM 1 it recreates ATM 1 then if he creates an other it creates ATM 3.

Here's my code.
pawn Код:
stock GetATMs()
{
    new file[60];
    for(new i = 0; i < MAX_ATM;i++)
    {
        format(file,sizeof(file),"ATMs/%i.ini",i);
        if(!dini_Exists(file)) continue;
    }
    return 1;
}
*Don't script much in sa-mp any more*.
Reply


Messages In This Thread
Loading 1 all time when creating new. - by jueix - 23.12.2013, 17:36
Re: Loading 1 all time when creating new. - by Jefff - 23.12.2013, 18:09
Re: Loading 1 all time when creating new. - by jueix - 23.12.2013, 19:18

Forum Jump:


Users browsing this thread: 5 Guest(s)