you could do something like that by modeling all the possibles (M4,M4 + Grenades,M4 + Shotgun ect)
then you could add actions to change the weapons ("Remove Silencer" action would change the weapon to the Same thing only without a Silencer, and the weapons would use different mags (the GL versions would only be able to use grenades, you get the idea))
and thats hows it could be done