[wiki]A_PlaySound[/wiki] is indeed what you should be using to play the sound. Remember to specify the channel, though.
(Just as a side note: don't get too caught up in trying to find "more elegant" ZScript alternatives if you aren't specifically trying to avoid a specific thing that is assumed or ignored by a known "DECORATE" action function. Generally that function, calling more native code to do what it does, will be more optimized anyway - I've been going back to a lot of my earlier ZScript "xxx=spawn... xxx.angle=... xxx.master=..." etc. codeblocks lately and replacing them with A_SpawnItemEx.)
That said...
The gun doesn't animate (yet, because I haven't actually put in the code for animation...I'm planning on handling that in a function instead and just calling that function here) but it does play the firing sound, and by listening to it the rate of fire is almost twice as fast. I also notice the gun is stationary when firing standing still, but jitters about randomly while bobbing if shooting while moving around.
I'm guessing it's faster now since it cycles through the loop much faster now as it doesn't pause a tic to animate each frame on the CGUN ABCD 1 line. Am I right?
Yes to your last question.
Here's what your first block of code does:
1. Play sound "gunshot" on the default channel
2. Run through one frame of whatever was last used, taking 1 tic
3. Run through frames CGUNA0 through CGUND0, each taking 1 tic
4. Go back to the ready state
Total time: 5 tics per shot
Here's what your second block does:
1. Play sound "gunshot" on the default channel
2. Run through one frame of whatever was last used, taking 1 tic
3. Check to see if the weapon's "loaded" variable is below 1; if it is, go to the ready state; if not, continue to 4
4. Run through frame CGUNA0, taking 1 tic
5. Continue to whatever is below that quoted section
Total time: 2 tics per shot
My example in that post does not include the Select and Deselect states. They are found on
the wiki's DECORATE version of the pistol actor - just add "();" after A_Raise/A_Lower, and put in a number inside those parentheses if you want the lower/raise to be faster or slower (bigger numbers are faster and the default is 6).
(It might be worthwhile to click on some of those links on that example code as well - everything you see there will work in ZScript, it's just a matter of formatting a few optional extras.)