ID Repeating issue

I've made a house system and for some odd reason if I close the server, then turn back on afterwards, it goes back to ID 1 even though id 1 -3 for houses are already created. I use:

pawn Код:
Total_House_Created ++;
To increase the ID, and it works perfectly if the server never turns off. The houses load perfectly aswell, So how could I fix this issue?

You must save the data.

I do save the data, it also names the house as the IDs, Then after restarting or turning server on again, it starts saving over the others with id 1, 2, 3, etc.

Load Saved Files on player connect

I load the houses on ongamemodeinit.

Forum Jump:

Users browsing this thread: 1 Guest(s)