1. Hey @Wulf is there a hook that is called only when the server is initialized every time a plugin is loaded?
     
  2. Doesn't OnServerInitialized do that?
     
  3. It calls after the server is initialized. But I don't think it calls every time a plugin is loaded when the server is initialized. Or does it?
     
  4. Yep, it does. The difference (that I've seen) is that OnPluginLoaded fires immediately when the plugin is loaded, but OnServerInitialized fires only if the server startup has been completed.
     
  5. Wulf

    Wulf Community Admin

    OnServerInitialized is called every time the plugin is loaded and on server startup as plugins can be hotloaded. If you want to only check it once, use a bool and check against that.
     
  6. I see. I was looking in the wrong spot for the OnServerInitalized hook. But found it in RustCore.cs
    Code:
    /// <summary>
            /// Called when another plugin has been loaded
            /// </summary>
            /// <param name="plugin"></param>
            [HookMethod("OnPluginLoaded")]
            private void OnPluginLoaded(Plugin plugin)
            {
                if (serverInitialized) plugin.CallHook("OnServerInitialized");
            }
    [DOUBLEPOST=1489159350][/DOUBLEPOST]Thanks Guys