Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
What, exactly, is it not doing that you want it to do?
I can see, first of all, that you have the lines for AmmoUse, AmmoGive, and AmmoType commented out, so they won't function, but what else is the matter?
The Chaingun only has four total images - two "Gun Flash" images, and two images of the barrels "spinning." When I tested the code, it worked fine. The image "CHGGB" is the second frame of the barrels spinning. The number 0 on the end indicates that this line/action has no frames actually assigned to play when activated. If you want to have that frame visible, change the 0 to a 1, like "CHGBB1" (or, CHGG B 1). This will, however, slow down the fire rate of the weapon.
CHGG A 0 A_PlaySound("weapons/uchain", CHAN_WEAPON)
to:
CHGG A 0 A_PlaySound("weapons/mchain", CHAN_WEAPON)
And create a sound file within your WAD called "mchain" that has the sound you want. Then, create a file within your WAD called "SNDINFO." Within this text file, put this: