Run plugins only on certain pages

I want to use my personal plugin only in some pages.
If I remove the add_action function (‘the_content’, ‘my_plugin_content’); the plugin does not show me the content of the other pages that are not in in_array ();