1. Sup beautiful people!

    In my plugin I would like to check if InfoPanel is loaded and if any dock has been anchored to the top. I believe it should have something to do with InfoPanel.PanelConfig.Dock but I can't seem to get anywhere past successfully checking if the plugin is loaded with Oxide's plugin reference and if(InfoPanel).

    If any one can explain to me how I might do this I would greatly appreciate it. I think I just need to get the value of the string Dock and see if it is "BottomDock" or "TopDock", then do stuff with it.

    The plugin is here: InfoPanel for Rust | Oxide
     
  2. I have been trying to do it reading through the source code of InfoPanel but I haven't managed to work out how to do it.
    [DOUBLEPOST=1463949007,1463694068][/DOUBLEPOST]
    Sorry Sqroot but I still need a little more help with this if you are willing.
     
  3. You can use this to see if a certains players panel is loaded:
    Code:
            bool PlayerPanelLoaded(BasePlayer player)
            {
                var panel = plugins.Find("InfoPanel");
                if(panel == null) return false;
                object isLoaded = panel?.Call("IsPlayerGUILoaded", new object[]{player.UserIDString});
                if(isLoaded is bool)
                {
                    if((bool) isLoaded)
                    {
                        return true;
                    }
                    else
                    {
                        return false;
                    }
                }
                return false;
            }
    However I do not think there is a way to see if "Everyones" panel is loaded.
     
  4. I just want to see if the InfoPanel plugin is loaded then check if any of those panels are docked at the top, if so then I will move my GUI down a little or shorten it.
     
  5. Oh. If you want to know if its loaded you would do the "var panel" and if panel is null then its not loaded. Otherwise its loaded. Im not sure how to check the config if its defaulted at top. I would ask @Wulf
     
  6. Well simply doing a plugin reference using oxides method then doing if(InfoPanel) checks if it is loaded or not.
     
  7. Yeah that works of course.