Yes, you can call the save function any time you want. Doing it at disconnect is normally done because it avoids redundant saves, plus it gives you the accurate last known data for the player.
How often does the average persons server crash? I ran one for years and it was very rare for me. If you have something that is causing a crash, address it. Don't let it be and work around the fact that you will get crashes.
Quote:
Originally Posted by redivcram
I'll keep that in mind. But can I add inside plugin_end an index for online players with get_players and when it crashes (ends) it saves it for every player? Yes.. confusing indeed
|
No, when a crash occurs nothing gets called. It's like a light switch. plugin_end() only gets called on graceful shutdown and map change.
__________________