I deleted this repository previously, I'm just bringing it back. I likely won't maintain this, though I'm not sure.
This is a proper fix for SA-MP's attachments. What this does, is hide attachments only for the player aiming with a sniper, heat seeker, rocket launcher or camera, unlike other fixes which hide the attachments for everyone.
Simply install to your project:
sampctl package install BrunoBM16/samp-attachments-fix