ALPHIVE 14 Posted May 5, 2017 Hi scripters ;) I know the questions should be asked and i searched about it but, i didnt found that i wanted ... :( I explain you the situation : i have a server and i want to show restart message announce, a message that pop The server restart every 3 hours (10800 seconds) and i will not change the schedule Actually i want make message pop 5 minutes before restart (10500 seconds from the start) Does exists a simply script that say : in 10500 seconds, all of the player will see a message "RESTART IN 5 MINUTES" ? Thank you guys for your help ;) Share this post Link to post Share on other sites
Midnighters 152 Posted May 5, 2017 waitUntil{time > 10500}; "Server will restart in 5 minutes" remoteExec["systemChat"]; Keep in mind that waitUntil will suspend any execution of scripts set in say something like the initServer.sqf, so the order in which they are executed in is important. This is probably a lame example and someone can give you something better but it's something for you to start with. Share this post Link to post Share on other sites
ALPHIVE 14 Posted May 5, 2017 you mean that i must place waitUntil after all scripts in the unitServer ? ^^ If not, can you me exemple maybe i didnt understand well :) Share this post Link to post Share on other sites
Midnighters 152 Posted May 5, 2017 2 minutes ago, ALPHIVE said: you mean that i must place waitUntil after all scripts in the unitServer ? ^^ If not, can you me exemple maybe i didnt understand well :) Yep that's exactly what I mean. It needs to be executed last, because waitUntil suspends sqf execution until the condition is true. Ex in the initServer.sqf: call compile "MyCoolScript.sqf"; call compile "ACoolerScript.sqf"; call compile "MyRestartTimer.sqf"; //this needs to be last. Share this post Link to post Share on other sites
ALPHIVE 14 Posted May 5, 2017 Ok get it bro i will try it ;) thank for help ;) Share this post Link to post Share on other sites
Stryker Mcknight 0 Posted December 13, 2019 If you where to add multiple "waitUntil{time > Sec};" in the script... Say I want 3 messages at 30 min, 20 min, and 10min. would this work for what i need or would it be better to just make a sleep function until the next message? Share this post Link to post Share on other sites
pierremgi 4753 Posted December 13, 2019 waitUntil{time > Sec} will check the condition on each frame. Use sleep instead, or something like waitUntil {sleep 1; serverTime > x}; on server. Share this post Link to post Share on other sites