23.12.2013, 17:36
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.
*Don't script much in sa-mp any more*.
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;
}