Hi all,
Excuse the ignorance, I have just returned to server hosting, gaming & Oxide development, since several years ago - and quite a bit has changed in terms of plugin development. Is there any up to date reference guide for creating C# plugins and performing tasks such as adding weapons to inventory, where previously it would have been via `GiveItem`.
Also, is there any information on what Covalence is & how to use it? I believe Covalence was first in development when I actually stopped gaming some years back.
Cheers
Up-to-date reference guide for C# plugin development?
Discussion in 'Rust Development' started by [FPSPlayers]Colin M, Jan 27, 2017.
-
Wulf Community Admin
Covalence is the universal API that we've been working on for developing plugins that work across each game Oxide supports.
Things such as GiveItem come from Rust, not Oxide; you'd need to dig into the game's Assembly-CSharp.dll for that.
Aside from that, nothing else has really changed in terms of how C# plugins are developed and work. -
Code for giving a player a item:
Code:player.inventory.GiveItem(ItemManager.CreateByItemID(id, amount));
-
Code:player.inventory.GiveItem()
-
-
Wulf Community Admin
-
Player is of type
Code:ProtoBuf.BasePlayer
Ignore the Inventory issue, that was actually due to ReSharper, I'll investigate that separately.
I'll continue manually going through Plugins and various forum posts to see best appliance of Covalence.
Thanks for the help as always Wulf & Dylan -
Wulf Community Admin
-