Create a PANEL that is the overlay for the sniper zoom. Then attach a function to 'on_mouse_right' that toggles this panel on and off, with 'toggle(pnl,SHOW)'.
So now you should be able to click and the zoom overlay will switch itself on and off. For the zooming part you can just increase/decrease the camera.arc variable. You should add a check to see if the zoom overlay is visible.
if(is(pnl_zoom,SHOW))
{
camera.arc += mickey.z * time_step;
}
You should add the above code inside the while loop of your camera/player's action.
Finally to prevent from zooming in too far/out too far, you can add an 'if' statement or you can use the function 'clamp'. You should also add 'camera.arc = 60' inside the panel toggle function, to reset the zoom every time you turn the sniper on/off.