434 Auto-Attack

I have been trying to find out how to stop auto attacking in c++ on a catalysm wow private server. I can’t seem to find a good c++ coder who can stop players from attacking eachother in a safezone.

A briefly description of what I mean: There is a certain area where players can’t attack eachother from. When they run out they can attack.

The problem is that everytime they run in and still have eachother as target they can attack eachother inside the Safe Zone and outside of out, but only with Auto-Attack and not spells. If anyone could provide me with some coding language that could help would be Appreicated.