Jump to content

Check when last client disconnect from a server


chromium

Recommended Posts

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)

ChromiumDis.png

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

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

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

  • 4 weeks later...

Same here !

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 !

Link to comment
Share on other sites

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

ChromiumDis.png

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

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

Openbeta: https://github.com/Chromium18/DSMC

 

The thing is, helicopters are different from planes. An airplane by it's nature wants to fly, and if not interfered with too strongly by unusual events or by a deliberately incompetent pilot, it will fly. A helicopter does not want to fly. It is maintained in the air by a variety of forces in opposition to each other, and if there is any disturbance in this delicate balance the helicopter stops flying; immediately and disastrously.

Link to comment
Share on other sites

@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 !

Link to comment
Share on other sites

  • Recently Browsing   0 members

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