1. Hello,

    I am coding in C# and have basic knowledge of it.
    Code:
    namespace Oxide.Plugins
    {
        [Info("Title of Plugin", "Description", "Your Name", "0.1.0", ResourceId = 681)]
        public class PluginName : RustPlugin
        {
            // This is where your plugin will do its magic
        }
    }
    I was wondering why errors pop up when pasting this into my C# class within my project. Also, I am not sure how to import the Rust library?
     
    Last edited by a moderator: May 29, 2015
  2. You'll need to reference the Oxide+Rust libraries.

    Assembly-CSharp.dll
    Oxide.Core.dll
    Oxide.Ext.CSharp.dll
    Oxide.Ext.Rust.dll
    UnityEngine.dll

    I personally also reference Oxide.Ext.Unity.dll, Newtonsoft.Json.dll, and RustIO's library.
     
  3. How Can I do this? :)
     
  4. Download "Telerik JustDecompile" and open them
     
  5. I have opened them using Telerik, I was wondering what the stage after that would be?
     
  6. press ctrl+f and search for what u want to check like hooks or sth
     
  7. For referencing within a C# IDE, i.e. Xamaran Studio?
    [DOUBLEPOST=1432904445][/DOUBLEPOST]So if I had a single class containing:
    Code:
    namespace Oxide.Plugins
    {
        [Info("ColourChat", "Makes the chat coloured!", "/", "0.1.0", ResourceId = 681)]
        public class PluginName : RustPlugin
        {
            void OnPlayerInit(BasePlayer player)
            {
                var message = string.Format("{0} has joined the server", player.displayName);
                rust.BroadcastChat();
            }
        }
    }
    What would be the issue?
     
    Last edited by a moderator: May 29, 2015
  8. Wulf

    Wulf Community Admin

    All of those are not needed, and referencing Oxide.Ext.Rust is discouraged. There are some default references made as well. In this case, the OP doesn't need to reference any or even use any using statements.

    C# using statements are not the same as figuring out what methods/functions exist to use.

    Filename: ColourChat.cs
    Code:
    namespace Oxide.Plugins
    {
        [Info("ColourChat", "Makes the chat coloured!", "TheImaginaryCow", "0.1.0", ResourceId = 681)]
        public class ColourChat : RustPlugin
        {
            void OnPlayerInit(BasePlayer player)
            {
                var message = string.Format("{0} has joined the server", player.displayName);
                ConsoleSystem.Broadcast("chat.add", 0, message);
            }
        }
    }
     
  9. Except that RustPlugin resides in Oxide.Ext.Rust...
     
  10. Wulf

    Wulf Community Admin

    The extension is automatically referenced.
     
  11. From compiled code, sure. But as he stated, he's coding in Xamarin studio, so he'd have to add the reference manually as far as development goes.
     
  12. Wulf

    Wulf Community Admin

    Normally you'd place the plugin in the Oxide.Ext.Rust/Plugins folder from the cloned repo if you are developing it in an IDE, but doing as you suggested work work as well if using it directly from the server's plugins folder. When live though, the reference is not needed and it used to cause problems if the DLL no longer exists or was renamed, but it shouldn't anymore.