1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Oxide for Rust Legacy has been discontinued and is no longer supported. No updates or additions will be made, and Rust Legacy-specific plugin submissions will no longer be accepted. We recommend upgrading to the latest version of Rust as able.
    Dismiss Notice
  1. HeeyZamp

    HeeyZamp Naked Wanderer

    I want to put that when the player uses the command and does not have the item, the plugin gives the item to it.
    It's possible?
  2. Jakkee

    Jakkee Plugin Developer

    Check the inventory class, I think it’s like Inventory.hasItem(String name)

    it is what you want...
    Code (Text):
    string ItemToGive = "P250";
    Inventory inv = netuser.playerClient.rootControllable.idMain.GetComponent("Inventory");
    if (inv != null)
        if (inv.FindItem(ItemToGive) != null)
            //Player has item
            //Player does not have item
            //Give item to player
    Last edited by a moderator: Oct 27, 2017