Posts: 1,861
Threads: 103
Joined: Sep 2011
Reputation:
0
How do you 'close' the gamemode? By typing exit as a Rcon command or in the console, or by simply clicking the red [X] of the console?
If I remember correctly, OnGameModeExit is only called when typing exit in the console or as Rcon command.
Posts: 97
Threads: 3
Joined: Feb 2013
As above.
What method do you enforce to "exit"
Posts: 21
Threads: 5
Joined: Mar 2014
Reputation:
0
Did you put the code to save the stats on OnPlayerDisconnect? If you put the code only in OnGameModeExit it doesn't not make really sense, you can't save the accounts info only when you close the GameMode.
Posts: 447
Threads: 102
Joined: Dec 2012
Reputation:
0
Sorry been very busy. I close the game mode by clicking the red X.
The character saving is also under OnPlayerDisconnect. I need it so any way the player gets disconnected their account will save? Whether it's using the rcon command to exit the console or force closing it.
Posts: 482
Threads: 3
Joined: Dec 2009
Reputation:
0
You can't save people's account on OnGameModeExit, If you were to make a new cmd called /restart or something and then saved account before restarting, that would work. But by pressing the x on the console windows. Will not call the OnGameModeExit function.
Posts: 447
Threads: 102
Joined: Dec 2012
Reputation:
0
This used to work for pressing the X button too on my other server, there's gotta be a way somehow.