woobla Posted June 12 Posted June 12 (edited) Hello. Please helps! We are making a recipe. In the recipe, we execute a function in the onCreate event that adds items item1 and item2. I need to remove item3. Does anyone know how to do this? inv:remove("TestMod.Item3"); - does not work function recipe_CreateItems(items, result, player) local inv = player:getInventory(); inv:AddItems("TestMod.Item1",2); inv:AddItems("TestMod.Item2",3); inv:remove("TestMod.Item3"); end recipe Create Two Items { Result:item3, Sound:AddItemInRecipe, Time:100.0, Category:Farming, OnGiveXP:Give10CookingXP, NeedToBeLearn:true, OnCreate:recipe_CreateItems, } Issue resolved. You need to add RemoveResultItem:true to the recipe, Edited June 12 by woobla Quote Share this post Link to post Share on other sites More sharing options...
Hugo Qwerty Posted June 12 Posted June 12 Just FYI, there is no remove function - it's Remove, or RemoveOneOf. There's also a DoRemoveItem. I don't know what the difference is between them. https://zomboid-javadoc.com/41.65/zombie/inventory/ItemContainer.html Quote Share this post Link to post Share on other sites More sharing options...