SA-MP Forums Archive
OnGameModeExit Question - 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: OnGameModeExit Question (/showthread.php?tid=603826)



OnGameModeExit Question - AdrianG - 28.03.2016

Hello folks. I have a question about ongamemodeexit. Is it called when I stop a server by X button or STOP button in Cpanel in Linux!? If yes, server stops after it (ongamemodeexit) finishes all instructions, even if they will take for instance 5 seconds in a loop for all players to save smth !?Thanks.


Re: OnGameModeExit Question - itsCody - 28.03.2016

it isn't called when you click x.
Or I don't think it does?

always rcon exit anyway.


Re: OnGameModeExit Question - SickAttack - 28.03.2016

OnGameModeExit isn't called when you close the command console. Using the stop button on cPanel does the same thing, as I assume it just terminates the process.


Re: OnGameModeExit Question - Vince - 28.03.2016

I believe a plain Linux kill commands sends a SIGTERM signal for a graceful shutdown. This is usually what a stop button comes down to, but you would need to check because the command can also be fed options to perform a SIGKILL.

After closing the server you should see in the server log that the plugins were unloaded and that something along the lines of "server shutting down" was printed.

On Windows you should probably type exit in the server console for a graceful shutdown.