In day of defeat, a client entering in console: cl_bobcycle 0
Will achieve this, but it also slightly offsets the tracer to the left of the xhair, so your aim isn't perfect. I don't know if this works in other games.
As far as doing it from AMXX, it isn't possible. I have tried many many many methods to do this, because I also want it for my realism mod.
But I have created ironsights. You have to use separate models and switch em back and forth. Pain in the arse really.