1. Please help me. Rust experimental, I use this code in my plugin:

    Code:
    private bool GiveItemToPlayer(BasePlayer player, string ItemName, int Count) {
        var ItemToGive = ItemManager.FindItemDefinition(ItemName);
        if(ItemToGive != null) {
            player.inventory.GiveItem(ItemManager.CreateByItemID(ItemToGive.itemid, Count), player.inventory.containerMain);
            return true;
        }
        return false;
    }
    But this is give item to player in silent mode. How to show popup default message to player in right bottom corner as we for example pickup wood or stones from the ground?
     
  2. I think this is the command to notify player they received something, like in my fishing plugin when you get a fish.

    Example in your case to show "give" notice:

    player.Command("note.inv", itemid, Count);

    Extra Note: use a negative number for Count to show a "take" notification.
    Ex... player.Command("note.inv", itemid, -Count);
     
    Last edited by a moderator: Apr 27, 2017
  3. Its work! Colon Blow, thank you very much.

    For some other users:
    Code:
    private bool GiveItemToPlayer(BasePlayer player, string ItemName, int Count) {
        var ItemToGive = ItemManager.FindItemDefinition(ItemName);
        if(ItemToGive != null) {
            player.inventory.GiveItem(ItemManager.CreateByItemID(ItemToGive.itemid, Count), player.inventory.containerMain);
            player.Command("note.inv", ItemToGive.itemid, Count);
            return true;
        }
        return false;
    }