1. 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
     
  2. Wulf

    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.
     
  3. Code for giving a player a item:
    Code:
    player.inventory.GiveItem(ItemManager.CreateByItemID(id, amount));
     
  4. I guess it's mostly my memory of working with them that has been forgotten from what it looks like when trawling through various plugin code from the site.

    Intellisense (& ReSharper) offer no option for, failing on "GiveItem"
    Code:
    player.inventory.GiveItem()
     
  5. I just copied that code from the give plugin. It works in most of my plugins that use it.
     
  6. Wulf

    Wulf Community Admin

    It may have changed some, but make sure your player is a BasePlayer in that instance.
     
  7. Player is of type
    Code:
    ProtoBuf.BasePlayer
    -Edit-

    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
     
  8. Wulf

    Wulf Community Admin

    You'd need to specify the right BasePlayer, as Rust's ProtoBuf.BasePlayer is not the right one.
     
  9. Did you ever figure out the problem with re-sharper? I'm currently having the same problem.