on_pre_player_disconnected event
Posted: Thu Aug 04, 2016 5:27 pm
As notified here viewtopic.php?f=23&t=30418, on_player_left_game is rather useless event, as the only thing you can do is to read player index and print bye-bye message only the other players will see.
However, whenever a mod does need to know that player is not in game anymore, it is often due to the fact the mod alters some player related information in some way, be it temporary boosts to player character, or change of the character altogether. In such cases, modders might have a desire to restore the normal state of player before he disappears.
And without such event, the only workaround for the issue is to periodically memorize all relevant info, so that it could be used after the player in off. For the mods that temporarily change the player's character, like avatars or commandncontrol, that means that all inventories, must be stored every so often, and if player is disconnected during the out of body experience, the mod must perform all the actions the game usually does to his body.
However, whenever a mod does need to know that player is not in game anymore, it is often due to the fact the mod alters some player related information in some way, be it temporary boosts to player character, or change of the character altogether. In such cases, modders might have a desire to restore the normal state of player before he disappears.
And without such event, the only workaround for the issue is to periodically memorize all relevant info, so that it could be used after the player in off. For the mods that temporarily change the player's character, like avatars or commandncontrol, that means that all inventories, must be stored every so often, and if player is disconnected during the out of body experience, the mod must perform all the actions the game usually does to his body.