Solved Plugin self-shutdown

Discussion in 'Rust Development' started by Reneb, Jul 29, 2015.

  1. Would it be possible to have some kind of way to shutdown a plugin from the plugin itself?
    For exemple:

    Code:
    [PluginReference]
            Plugin DeadPlayersList;void Init()
    {
    if(DeadPlayersList == null)
    {
    Debug.Log("You can't run this plugin without Dead Players List");
    this.Shutdown();
    }
    }
     
  2. Maybe something like this:
    Code:
    Interface.Oxide.UnloadPlugin("PluginName");
     
  3. Wulf

    Wulf Community Admin

    You can, just tell Oxide to unload it. ;)
     
  4. With the example that Bombardir gave us ?
     
  5. Wulf

    Wulf Community Admin

    Or run Oxide's unload console command.
     
  6. what bombardir said would work ^^?
     
  7. Interface.Oxide.UnloadPlugin("PluginName");
     
  8. thx pain and bombardir :)