// Save a copy of the current cargo private _a = itemCargo _vehicle // Remove the item _a deleteAt (_a find "CLASS_NAME") // Add the rest { _vehcicle addItemCargo [_x, 1]; } forEach _a;