Hello,
I am coding in C# and have basic knowledge of it.
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?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 } }
Solved How do I import the Rust library?
Discussion in 'Rust Development' started by TheImaginaryCow, May 29, 2015.
-
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. -
-
-
I have opened them using Telerik, I was wondering what the stage after that would be?
-
-
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(); } } }
Last edited by a moderator: May 29, 2015 -
Wulf Community Admin
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); } } }
-
-
Wulf Community Admin
-
-
Wulf Community Admin