SA-MP Forums Archive
Save server state - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Save server state (/showthread.php?tid=273318)



Save server state - Superthijs - 01.08.2011

Hi all,
I'm looking for a script that saves the state of the current session to a file when the server shuts down, and when it starts again, the file containing the session data is loaded again and the session becomes the same it was when it shut down.
Is this possible?

Sorry for my bad English.
Superthijs


Re: Save server state - Superthijs - 01.08.2011

Sure hope you understand it, cuz it's a bit long.


Re: Save server state - alpha500delta - 01.08.2011

Hmm, you can use Dini, DJson, Y_INI, Fini, SII or even MySQL if you are experienced with that. You can also use the file saving that comes with SA:MP. Here, have a look at these tutorials and links:
_____________________________________________
https://sampforum.blast.hk/showthread.php?tid=273088
https://sampforum.blast.hk/showthread.php?tid=267808
https://sampforum.blast.hk/showthread.php?tid=174575
_____________________________________________
fopen
fread
fwrite
fclose
fremove
_____________________________________________
Also you are only allowed to bump your topic every 48 hours. You bumped within 3 minutes lol.