1. I have visual studio community software 2013 (free)
    https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx

    In my project, I have set references to all the Oxide dll's in the RustDedicated_Data\Managed folder, so I can use intellisense on them (explore methods/arguments and such, autocomplete etc).

    I noticed, that many plugins use the BasePlayer type. When I use this, I get a squigly line in visual studio, indicating I should set a reference. But I dont know what dll BasePlayer resides in. The code runs just fine.

    How do I get intellisense working for BasePlayer?

    Test01.cs in plugins folder:
    Code:
    // Reference: Oxide.Ext.Rustusing System;
    namespace Oxide.Plugins
    {
        [Info("Test01", "Bas", "0.1.0", ResourceId = 99681)]
        public class Test01 : RustPlugin
        {
            int authLevel = 2;        [ChatCommand("authLevel")]
            void cmdChatAuthLevel()
            {
                Console.WriteLine("authLevel={0}", authLevel);
            }        [ChatCommand("setAuthLevel")]
            void cmdChatSetAuthLevel(BasePlayer player, string command, string[] args)
            {
                authLevel = Convert.ToInt32(args[0]);
                cmdChatAuthLevel();
            }
        }  
    }
     
  2. Wulf

    Wulf Community Admin

    I'd clone the Oxide repo, and place your plugin under Oxide.Rust.Ext\Plugins instead, but I'm not sure that'd make a difference. It's possible you are missing an import, but I'm not a C# master. I do know that the magic comment at the top isn't needed anymore though.
     
  3. I downloaded as a zip the Oxide-project from github https://github.com/OxideMod/Oxide
    Extracted, open with visual studio, search for 'BasePlayer'

    It turns out BasePlayer is defined in RustDedicated_Data\Managed\Assembly-CSharp.dll
    Setting a reference to Assembly-CSharp.dll in my plugin-project did the trick.