Exit Samp Server
#1

Good afternoon, I would ask to be sent the statement 'exit' in the console before closing the samp server. For When You kill the process by pressing the 'x' it does WHAT is in OnGameModeExit callback.

Several times my server did not save the data correctly due to this failure: /.

Thank you for your attention.
Reply
#2

This is your problem with scripting not kalcor's problem!
Be more specific and don't blame other people.
I believe you did something wrong with save system l.
Reply
#3

Test yourself.

Instead of giving the 'exit' command in the console, click the 'X'.

with 'exit' :
Код:
Console input: exit
[23:18:39] --- Server Shutting Down.
[23:18:39] 1
with click 'X'.
Код:
Does not call the callback OnGameModeExit
Reply
#4

Save it right away after you update it then.
Reply
#5

Why you need this feature when you can /q without missing files/coding.
Reply
#6

Quote:
Originally Posted by LuiisRubio
Посмотреть сообщение
Save it right away after you update it then.
This can cause a lot of lag

Quote:
Originally Posted by Alex Magaсa
Посмотреть сообщение
Why you need this feature when you can /q without missing files/coding.
With this feature we will be more security in the data.

If you give a power outage or something that makes the console close, we lose the data that was then.
Reply
#7

Quote:
Originally Posted by ViniKuliveguisky
Посмотреть сообщение
If you give a power outage or something that makes the console close, we lose the data that was then.
The only way is to save your users once in a while.. Doing so 'X' launches the exit command will not aid you when you get a power outage.

And if your argument is that it's lagging when you're saving your users, you should seriously start using threaded queries and stop using stoneage-old techniques.
Reply
#8

Power cuts would do the same regardless of you closing of the window, as the problem there is that the power went out.

Don't close the window, ALWAYS use exit, as you're not closing the "server" you're closing the window containing the server process.

Both of these, will result in unclean shutdowns.


If you have a UPS that needs to process the shutdown, there are ways of doing that.
Reply
#9

Don't click the "x" button to close any DOS-window.
Highlight the server's console and press CTRL + C to shutdown the server.

And save your data whenever it changes, not just every 15mins or so, or only upon player disconnect.
Whenever a player earns money, save.
Earn scorepoints, save.
Finish a mission, save.
Always save when something changes.
And when doing it properly, you won't get lag.

This prevents dataloss at any time (sudden power outage, server crashes, ...).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)