Open your autoexec.cfg and add the following commands to get a zoom function for all weapons, if you don't know how, read our FAQ: What is a config file?
Zoom with all weapons & custom zoom sensitivity
bind "MWHEELDOWN" "g_fov 110;sensitivity 10" // Zoom Out
bind "MWHEELUP" "g_fov 40;sensitivity 4" // Zoom In
This works on Quake 4 servers which don't restrict the FOV.
Downsides to this FOV script
If you zoom using this script, you won't get the extra damage inflicted by the Machine Gun, which you normally would get using the standard "_zoom" command.
I have mouse3 bound to "_zoom", so I can zoom in with the Machine Gun to get the extra damage and still be able to zoom with the other weapons, which don't give damage bonuses when using "_zoom".