SA-MP Forums Archive
Player Stats Loading/Saving - 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)
+--- Thread: Player Stats Loading/Saving (/showthread.php?tid=446834)



Player Stats Loading/Saving - Danny123 - 27.06.2013

Alright so I have scripting experience and all but for some reason I can't figure out this problem. I'm thinking it might be a path of some sort? But when a player logs on and lets say obtains score, money, and level whatever it might be then logs off and logs back on it will save. BUT when I shut the server off everything is lost? Not exactly sure of the problem here.


Re: Player Stats Loading/Saving - Akira297 - 27.06.2013

You're mentioning when you forcefully through the (RCON) do such? Whenever someone restarts the server forcefully (incorrectly/nonsafely) it can cause damage. (/rcon gmx or /rcon exit).


Re: Player Stats Loading/Saving - Danny123 - 27.06.2013

Quote:
Originally Posted by Akira297
Посмотреть сообщение
You're mentioning when you forcefully through the (RCON) do such? Whenever someone restarts the server forcefully (incorrectly/nonsafely) it can cause damage. (/rcon gmx or /rcon exit).
Even with using /rcon exit.. The player stats still fail to save and load when starting the server up and logging back in, I also realize that when I go into the player's account in the files there is nothing in the player account.. Usually you would see the player level, how much cash, etc there is nothing there just a blank userfile.


Re: Player Stats Loading/Saving - Akira297 - 27.06.2013

Quote:
Originally Posted by Danny123
Посмотреть сообщение
Even with using /rcon exit.. The player stats still fail to save and load when starting the server up and logging back in.
When using the (/rcon gmx and /rcon exit) are very unsafe ways of (closing/restarting) your server. That's why you should do it through your host or putty.


Re: Player Stats Loading/Saving - Danny123 - 27.06.2013

Quote:
Originally Posted by Akira297
Посмотреть сообщение
When using the (/rcon gmx and /rcon exit) are very unsafe ways of (closing/restarting) your server. That's why you should do it through your host or putty.
Still fails to save, also I edited the last post of mine and added more. "I also realize that when I go into the player's account in the files there is nothing in the player account.. Usually you would see the player level, how much cash, etc there is nothing there just a blank userfile."


Re: Player Stats Loading/Saving - Akira297 - 27.06.2013

Quote:
Originally Posted by Danny123
Посмотреть сообщение
Still fails to save, also I edited the last post of mine and added more. "I also realize that when I go into the player's account in the files there is nothing in the player account.. Usually you would see the player level, how much cash, etc there is nothing there just a blank userfile."
You should check for when the game-mode is exiting for the information regarding the player(s) user-files.


Re: Player Stats Loading/Saving - Stanford - 27.06.2013

Maybe your player saving comes in a certain time or something, Just before closing or gmxing create a command that saves everything like [/savechars] or something it'll be helpful, and this is called "rollback" when a thing is done and it's not loaded.