• 0
Aboode Altikrity

Restart Messages showing in same time

Question

Hello Guys i wonder if i can get the fix of restart messages because i tried to fix it but i field im using this ==>

/**
 * Exile Mod
 * www.exilemod.com
 * © 2015 Exile Mod Team
 *
 * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. 
 * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
 */
 
private["_restartTime","_restartMessages","_useAutoKick","_kickTime","_lockTime","_uptime","_timeTilRestart","_time","_i"];
_restartTime = _this select 0;
_restartMessages = _this select 1;
_useAutoKick = _this select 2;
_kickTime = _this select 3;
_lockTime = _this select 4;
_uptime = call ExileServer_util_time_uptime;
_timeTilRestart = _restartTime - _uptime;
if (typeName _restartMessages isEqualTo "ARRAY") then
{
	if !(_restartMessages isEqualTo []) then
	{
		{
			_time = _x;
			if (_timeTilRestart < _time) then
			{
				if (count ExileSessionIDs > 0) then
				{
					["notificationRequest",["Success",[format["Server restart in %1 min!",_time]]]] call ExileServer_system_network_send_broadcast;
					//["notificationRequest",["RestartWarning",[format["Server restart in %1 min!",_time]]]] call ExileServer_system_network_send_broadcast;
				};
				ExileServerRestartMessages deleteAt _forEachIndex;
				format ["Restart Warrnings for %1min sent",_time] call ExileServer_util_log;
			};
		} 
		forEach _restartMessages;
	};
};
if (_timeTilRestart < _lockTime) then
{
	if !(ExileServerIsLocked) then
	{
		"#lock" call ExileServer_system_rcon_event_sendCommand;
		"Server locked for restart" call ExileServer_util_log;
		["notificationRequest",["LockKickWarning",["You will be kicked from the server due to restart."]]] call ExileServer_system_network_send_broadcast;
		ExileServerIsLocked = true;
	};
	if (_timeTilRestart < _kickTime) then
	{
		if !(ExileServerRestartMode) then
		{
			call ExileServer_system_rcon_event_kickAllrestart;
			"Everyone kicked for restart" call ExileServer_util_log;
			call ExileServer_system_rcon_event_clearBuffers;
			"Buffers cleared!" call ExileServer_util_log;
			for "_i" from 0 to 9 do
			{
				"SERVER READY FOR RESTART!!" call ExileServer_util_log;
			};
			ExileServerRestartMode = true;
			uiSleep 10;
			"#shutdown" call ExileServer_system_rcon_event_sendCommand;
		};
	};
};
true

All messages Show in the same time !

thanks

Share this post


Link to post
Share on other sites

2 answers to this question

  • 0

I use firedaemon and infstar to handle my restarts and messages. Make sure you dont have more than one thing calling restart messages.

Share this post


Link to post
Share on other sites
  • 0
On 3/6/2016 at 6:09 AM, crackerjack0903 said:

I use firedaemon and infstar to handle my restarts and messages. Make sure you dont have more than one thing calling restart messages.

Firedeamon doesn't work in my PC Idont know why ? and i dont have enough $ for infistar :)) But just one script have restart messages im really sure 

 

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.