What happens if you have had a heart attack in the past if you take risperidone does this pose any risk to your life?

A little. There is a small increased risk but if he needs it, he needs it. (for all meds, one must balance risk and benefit. No med comes free of risk).