Jump to content
Mr H.

PlayerDisconnected eh on dedi server. (not persistent)

Recommended Posts

Our dedi server is set up to be non persistent. The mission is closed whenever the last client disconnects.
I was wondering if the mission EH:  addMissionEventHandler ["PlayerDisconnected", { would still fire after the last user disconnects, allowing me to save some stuff in the server's profilenamespace when the last client disconnects.

Share this post


Link to post
Share on other sites
20 minutes ago, gc8 said:

I'm using HandleDisconnect EH. 

 


addMissionEventHandler ["HandleDisconnect", 
{
 params ["_player", "_id", "_uid", "_name"];
 
 _player call savePlayer;
 
 false
}];

 

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/addMissionEventHandler#HandleDisconnect

 

I assume it works for last player!

 

It has always worked for me

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

I've been using HandleDisconnect to, (not tested yet on the dedi). What I can tell you is that it doesn't fire when testing in the editor in mp when leaving the mission to go back to the editor. I will try it on the dedi then.

  • Like 1

Share this post


Link to post
Share on other sites

After testing on the dedi it seems that the EH doesn't fire for the last player. Or maybe it does fire but since the server resets the mission after the last client disconnects it doesn't have time to save to profilenamespace

Share this post


Link to post
Share on other sites

 

1 hour ago, Mr H. said:

After testing on the dedi it seems that the EH doesn't fire for the last player. Or maybe it does fire but since the server resets the mission after the last client disconnects it doesn't have time to save to profilenamespace

maybe you could save if the last player on server opens his game menu instead on disconnect.

Share this post


Link to post
Share on other sites

Yes that's a good idea! I'll try that.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×