_items = items player;_recipe = [ ["item1", 5], ["item2", 3], ["item3", 98]];_crafting_allowed = true;{ _item = _x
#0; _wanted_num = _x#1; _num = {_x isEqualTo _item} count _items; if (_num < _wanted_num) then { _crafting_allowed = false };} count recipe;if ( _crafting_allowed ) then {// script};