Player data becomes corrupt after manual server restart
#1

I don't know whether this is correctly posted or not but I have this problem that whenever I restart my test server manually while the player is logged on, the player's data becomes corrupt. (Skin changes to 0, spawn place becomes blueberry,...)

Is there a fix for this problem? It concerns me for when my test server crashes randomly that all the data becomes corrupt.

I added this to OnGameModeExit();
pawn Код:
public OnGameModeExit()
{
    foreach(new i : Player)
    {
        if(IsPlayerConnected(i))
        {
            if(fexist(UserPath(i)))
            {
                SaveAccountInfo(i);
            }
        }
    }
    return 1;
}
Help is much appreciated.
Reply
#2

Don't use /rcon GMX, use an ingame command and make a timer of 3-5 seconds to save every data of a player then restart the server.
Reply
#3

Quote:
Originally Posted by DaniceMcHarley
Посмотреть сообщение
Don't use /rcon GMX, use an ingame command and make a timer of 3-5 seconds to save every data of a player then restart the server.
I have an ingame command /gmx and I did make a timer for it.
But the thing I am concerned about is: if the server crashes for some reason for example the host has problems, will it corrupt player data? Or not?
Reply
#4

How are you saving the data each one second(Timer) or OnPlayerDisconnect?
Reply
#5

I'm saving it under OnPlayerDisconnect and OnGameModeExit.
Reply
#6

Show the stock ?

stock SaveAccountInfo(playerid)... ?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)