Skip to content

OnServerRestart

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnServerRestart( string strNotice, int iSeconds )
{
    Puts( "OnServerRestart works!" );
}

Location

  • ServerMgr::RestartServer(string strNotice, int iSeconds)
csharp
//---
			"<color=#fff>SERVER</color> Restart interrupted!"
		});
		SingletonComponent<ServerMgr>.Instance.StopCoroutine(SingletonComponent<ServerMgr>.Instance.restartCoroutine);
		SingletonComponent<ServerMgr>.Instance.restartCoroutine = null;
	}
	if (Interface.CallHook("OnServerRestart", strNotice, iSeconds) != null)
	{
		return;
	}
	SingletonComponent<ServerMgr>.Instance.restartCoroutine = SingletonComponent<ServerMgr>.Instance.ServerRestartWarning(strNotice, iSeconds);
	SingletonComponent<ServerMgr>.Instance.StartCoroutine(SingletonComponent<ServerMgr>.Instance.restartCoroutine);
//---

Released under the MIT License.