Jump to content

Check when last client disconnect from a server


Recommended Posts

Posted

Hi, is there a easy check verify if a server haven't any client connected in a particoular moment? Or I have to do the math between client connect events and client disconnects?

 

thanks!

 

(I'm looking for a server auto-restart function that would work only after "n" hours but, if any clients is connected, it will eventually wait for the last one disconnect)

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Github for latest version: https://github.com/Chromium18/DSMC

  • 4 weeks later...
Posted

did this, as an hooks code

(place in Saved Games\Scripts\Hooks)

 

tested locally and it works... don't know for others.

Setup is a single variable inside the script.

 

does not require lfs, os sanitization.

shouln't require anything to be honest.

Reloader_hooks.lua

Author of DSMC, mod to enable scenario persistency and save updated miz file

Stable version & site: https://dsmcfordcs.wordpress.com/

Github for latest version: https://github.com/Chromium18/DSMC

Posted

@chromium thanks, this is a very interesting script.

The way you use the onTriggerMessage callback is really clever !

Do you know of a way of actually restarting the server process instead of "simply" reloading the mission ?

 

I'll probably end up using some of your code in a script of my own, if you're ok with it !

Zip - VEAF :pilotfly:

 

If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum

If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...