But his bind woud get triggered every time he pressed the right mouse button. His mouse binding would have no way of knowing wheather he's holding a sniper or m4.
That doesn't matter. The bind will do its job regardless of what weapon he's using whenever he presses the button.
See it this way; if he uses M4 or RPG and tries to aim in FPV with them, the bind will do what it's programmed to do which is zooming in at an increased sensitivity.
However while the bind is trying to do that, the reality remains that nothing will happen since both M4 and RPGs can't zoom in like sniper rifles can.
The gameplay is unaffected in this case.
Now if he would switch to a sniper rifle and try to aim, the bind will again do its job.
In this case the bind will have effect since the scopes allow to zoom in and out at will.
The game's mechanics pretty much restricts the bind to sniper rifles only.
The only way for that bind to have an effect on M4 or RPG is by modding either of those weps in a way that allows them to zoom in like sniper rifles do.
This is only achievable via Cleo modding.