Jump to content

1 Screenshot

  • 18.2k
  • 65
  • 220.54 kB
 Share

About Item Ownership

ItemOwnership

V1.0.57 by Lurch

 

A utility which tracks special items and prevents them from being picked up or used by other players unless the items are in a shareable items list.

Important Notes:

  1. This plugin is NOT a standalone plugin. It is designed to work with other plugins on modded Rust servers. You must either modify an existing plugin, have the author of an existing plugin modify theirs to work with ItemOwnership, or have a plugin that already works with ItemOwnership to get the benefit of this plugin (e.g. Invisibility Cloaks)
  2. This plugin has not been tested with items that are stackable. We expect that the underlying FacePunch code will utterly break the original item’s UID, so there’s no support at this time for stacked special items.
  3. It is up to you, the developer / system op to ensure that special items in your server that you wish to prevent sharing between players cannot be stacked.

Operation:

ItemOwnership ( IO ) keeps track of the Unique Item Id’s for specially crafted / given items. For example, a special player-usable Invisibility Cloak (available: MyVector.xyz or CodeFling.com) that works directly with IO. 

IO will also work with any other plugin that uses the IO API. The API can be called by an by an in-game /kit command or from an NPC vendor. When your special or unique item is created, the plugin responsible for the item creation must call the IO API hook, UpdateItemList() – this hook allows adding new items, changing ownership of existing items and deleting items from the registry. (Usually called when an item is destroyed.)


From the time the new item is registered to an owner, any other player will be unable to:

  • Pick up the item.
  • Equip or use the item.
  • Transfer the item to inventory.
  • Move the item in any inventory.

 

Uses Oxide Permissions / Carbon permissions compatible

API:

Void UpdateItemList(BasePlayer owner, Item item, int action)

Where:

            Owner is a BasePlayer object (the item’s intended owner)

            Item is the actual in-game item

            Action is one of:        0 = Add new

                                               1 = Change Owner

                                               2 = Delete (Item was destroyed)

 

Bool? IsItemOwner(BasePlayer player, Item item)

Returns null / true / false under these conditions:

                                null = Unable to find the item in the IO registry

                                true = Specified player IS the item’s owner

                                false = Specified player is NOT the item’s owner.

 

 

Example C# code to call into IO API to add item to tracking file: 

Interface.CallHook("UpdateItemList", player, myItem, 0); // 0 = add

 

  • Like 1

Lurch's Collection

User Feedback

1.1m

Downloads

Total number of downloads.

5.8k

Customers

Total customers served.

84.6k

Files Sold

Total number of files sold.

1.6m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.