01.03.2019, 22:16
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;
}