How to save in Y_INI ? - 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: How to save in Y_INI ? (
/showthread.php?tid=490334)
How to save in Y_INI ? -
kubeba59 - 26.01.2014
Hey guys,
When I close server-samp.exe without exit the game it doesn't save the player stats but when I use /q it works perfectly.
Can you help me fix it guys ?
Re : How to save in Y_INI ? -
MCZOFT - 26.01.2014
it's normaly , since you are forcing the server to shutdown quickly the datebase of server , you cannot save it ...
either maybe there is another way , but im not sure
Re: How to save in Y_INI ? -
Vanter - 26.01.2014
for me I make a automatic hour save, just make a timer to save it every hour, it's impossible to make it save with closing the .exe, so saving every hour will decrease the loss.
Re : How to save in Y_INI ? -
MCZOFT - 26.01.2014
PHP код:
//In The OnGameModeInit:
SetTimer("SaveAccounts",600000,1);
//In the End of the GameMode
forward SaveAccounts();
public SaveAccounts()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SavePlayer(i);
}
}
}
Re: Re : How to save in Y_INI ? -
dorperez - 26.01.2014
Quote:
Originally Posted by MCZOFT
PHP код:
//In The OnGameModeInit:
SetTimer("SaveAccounts",600000,1);
//In the End of the GameMode
forward SaveAccounts();
public SaveAccounts()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SavePlayer(i);
}
}
}
|
Didn't helped bro,its the same .. :\
Re: How to save in Y_INI ? -
Ranshand - 26.01.2014
You can not fix it, you can save player status per hour or half hour like me and if player exit the game.
Re: How to save in Y_INI ? -
kubeba59 - 26.01.2014
What do you mean I can't fix it :O
Re: How to save in Y_INI ? -
kubeba59 - 28.01.2014
uP.......
Re: How to save in Y_INI ? -
gtakillerIV - 28.01.2014
I'm guessing it's because you're not writing "exit" in the console. When you press the "X" button to close the server, it doesn't call "OnGameModeExit".
Re: How to save in Y_INI ? -
kubeba59 - 28.01.2014
Quote:
Originally Posted by gtakillerIV
I'm guessing it's because you're not writing "exit" in the console. When you press the "X" button to close the server, it doesn't call "OnGameModeExit".
|
So if my linux server crash it wouldn't save any of the player stats..
How can I save player stats if the server crash ?