ArmA 3 Scripting |
Lately, whilst making a slight diversion from my own scripting, I have been helping out the guys from
Without the usage of a Battleye client (eg BEC) running on the hosted server to help with timed server messages, I attempted to put together my own version of a script/timer function that was able to be ran on a hosted gaming server, or a dedicated gaming server... and I succeeded.
Beforehand there was no able way to warn/notify the players on the server about when the server was going to be restarted, you just had to keep notice of the time yourself, and many (if not all) players including myself have been caught out many times, wonder why the server d/c us... only to check the current local time to realize it was an actual server restart.
serverRestartMessage.sqf code preview |
I have now scripted a server side function/loop to grab the actual hosted server time (not in-game time) and run a timing schedule off of it. Currently server reset times (Australia, Sydney time) are 03:00, 09:00,15:00 and 21:00. The timing routine keeps track (to the second) of the current server time in HH:MM:SS, it then warns you in-game from 30/20/10/5/2/1 minute(s) until restart, in the middle of the screen in big bold colorful writing. There is also an option to have it count down in seconds from the 1 minute mark (as seen in the second screenshot below).
30 minute warning message |
the 60 second countdown has begun |
You can check out/download the script here on my GitHub.
P.S. Back to my own mod scripting soon.
-soul.