saving over all ATMs?
#2

I don't understand, does it save just the last created ATM? If so, try:

pawn Код:
stock ATM_Save()
{
    for(new i = 0; i < MAX_ATM_MACHINES; i ++) if(ATMData[i][atmExists])
    {
        new query[200];

        format(query, sizeof(query), "UPDATE `atm` SET `atmX` = '%.4f', `atmY` = '%.4f', `atmZ` = '%.4f', `atmA` = '%.4f', `atmInterior` = '%d', `atmWorld` = '%d' WHERE `atmID` = '%d'",
        ATMData[i][atmPos][0],
        ATMData[i][atmPos][1],
        ATMData[i][atmPos][2],
        ATMData[i][atmPos][3],
        ATMData[i][atmInterior],
        ATMData[i][atmWorld],
        ATMData[i][atmID]);
        mysql_tquery(g_iHandle, query);
    }
    return 1;
}
Reply


Messages In This Thread
saving over all ATMs? - by TheLeech - 27.02.2019, 17:04
Re: saving over all ATMs? - by SymonClash - 01.03.2019, 22:16

Forum Jump:


Users browsing this thread: 1 Guest(s)