1. Is it possible to remove unwrap or any button infact? Or maybe is it possible to make a requirement before pressing? http://i.imgur.com/snHO80X.png
     
  2. Just a bit of help, you could use like
    Code:
    object OnItemConsumed(BasePlayer player, ItemInfo iteminfo)
    {
        if(item == "item.present")
          return false;
        else
          return true:
    }
    That wont work most likely but its something you can base off of.
     
  3. Wulf

    Wulf Community Admin

    You can block any commands sent to the server, but you can't remove any client buttons or elements.
     
  4. Hm would i be able to stop people from picking up an item in specific or stopping them from opening a chest? Just a bit curious. Also where could i get an example of that if it is possible
     
  5. Wulf

    Wulf Community Admin

    To prevent them from opening a chest/box, something like this should work:
    Code:
            object CanUseDoor(BasePlayer player, BaseLock door)
            {
                if (prefab.Contains("box"))
                {
                    return false;
                }
            }
    For item pickups, you could probably change what they get via the OnItemPickup hook and some others.
     
  6. Thanks i just didn't think you could just do a return like that. This is enough info
    [DOUBLEPOST=1458355352,1458312512][/DOUBLEPOST]Well sorry for the double post, but i have this it does trigger it, but i can't seem to make it get blocked?
    Code:
            object OnConsumableUse(Item item)
            {            BasePlayer player = item.GetOwnerPlayer();
                if (item.info.itemid == -1732316031)
                {
                SendReply(player,"test 1");
                return false;
                }else{
                    SendReply(player,"test 2");
                return true;
                }
            }
     
  7. Wulf

    Wulf Community Admin

    There is no return behavior, see Rust. You can only modify, not cancel.
     
  8. Hmm okay well i thought of a different idea. Is it possible to use ray casting to see if a player is looking at a physical present? like these? http://i.imgur.com/PT1n4Wx.jpg If so how? Because i i know how to do terrain or water, but not too sure how to do an object with ray casting.