For a command to act upon a given state, you need a variable value representing said state, and flow control actions to alter the execution of the command depending on the value of said variable.
E.G. if you have a command that sets your current weapon to "guns" (even if you have your joystick button set up ingame directly, you'll want to have it trigger a VoiceAttack command as well to keep track of state changes), it could contain something like
Set text [activeWeapon] to 'guns'
I'd use a text value rather than a magic number (E.G. an integer value where 1 means guns, 2 means AMRAAM, etc...) for readability.
Unless you're going to use a value to do math (including incrementing and decrementing it), that's generally what I'd recommend (the overhead isn't really relevant on a modern computer) in this context.
In the command that fires when you press the trigger button on your joystick, you'd then have something like
Begin Text Compare : [activeWeapon] Equals 'guns'
Say, 'guns, guns, guns'
Else If Text Compare : [activeWeapon] Equals 'AMRAAM'
Say, 'Fox three'
Else If Text Compare : [activeWeapon] Equals 'Sparrow'
Say, 'Fox one'
Else If Text Compare : [activeWeapon] Equals 'Sidewinder'
Say, 'Fox two'
Else
Say, 'No active weapon'
End Condition
The "Else" action's branch will be executed if the variable has a value other than the four listed, which would occur if no value has been set yet (I.E. when you press the trigger before pressing a button to select a weapon)
Neither of these concepts are specific to VoiceAttack;
This topic attempts to explain the basic control flow involved, with VoiceAttack actions as examples.
General guides on the basic principles of programming should also explain these concepts (while the syntax will differ, the underlying logic is the same).
VoiceAttack is written in C#, and as such the GUI-based scripting system has many commonalities with that language, including being strongly typed (basically meaning variables can only store their specific kind of data, E.G. an Integer variable cannot hold text)