How can I add a on collision(Attack) effect like frozen on attack?! Can I please get it in the form of c++ code?!

How can I add an attack effect like when a projectile hits the an object it will freeze(Its input will get disabled) or it will start burning?! I want to know how to add an effect on a mesh