CEngineSharp_Server.World.Entities.Player.GiveItem C# (CSharp) Method

GiveItem() public method

public GiveItem ( System.Item item ) : void
item System.Item
return void
        public void GiveItem(Item item)
        {
            if (_inventory.Count < Constants.MAX_INVENTORY_ITEMS)
            {
                _inventory.Add(item);

                if (this.InMap)
                    this.SendInventory();

                this.SendMessage("You have received " + item.Name);
            }
            else
            {
                this.SendMessage("Your inventory is full!");
            }
        }