function onMissionEnded(){ saveServerStats();}
Obviously there's nothing to be done when exiting in some ways, such as clicking the x on a dedicated server window, or just plain crashing, but you can cover a couple ways.
function doQuitGame(){ //Save function here Parent::doQuitGame();}
I've found its usually better to do stuff upon the server shutting down and saving things periodically (but in an efficient way)this is how player_persistence does it:Code: [Select]function doQuitGame(){ //Save function here Parent::doQuitGame();}