There are a few things that could be done differently here...
You're using the "{CMD}" token to get the entire spoken phrase, but then using the "{TXTREPLACE:}" token to remove part of that phrase (though you're removing "open" rather than "on", which won't work as that's not part of the spoken phrases).
If you had used the "Contains" or "Ends With" operator in your conditions, that would not be necessary, and even if it were necessary, the "Set a Text Value" action has a built-in "Replace" option that would be more efficient than using a token for a single replace, or you could nest the "{TXTREPLACEVAR:}" token to replace both at once, E.G.
{TXTREPLACEVAR:"{TXTREPLACEVAR:"{CMD}":"on ":""}":"off ":""}
Also note the spaces in "on " and "off "; If you don't remove the space and use the "Equals" operator, " cargoscoop" does not match "cargoscoop". Whitespace counts.
"{TXTREPLACEVAR:}" is used in these examples, as "{TXTREPLACE:}" is deprecated (it does not appear in the official documentation for this reason).
To check for one keyword, and then the other, you can nest conditions inside each other, E.G.
Begin Text Compare : [{CMD}] Ends With 'cargoscoop'
Begin Text Compare : [{CMD}] Starts With 'on'
Say, 'cargo scoop deployed'
Else
Say, 'cargo scoop retracted'
End Condition
Press 1 key and hold for 0,06 seconds and release
Else If Text Compare : [{CMD}] Ends With 'hardpoints'
Begin Text Compare : [{CMD}] Starts With 'on'
Say, 'hardpoints on'
Else
Say, 'hardpoints on'
End Condition
Press 2 key and hold for 0,06 seconds and release
Else
Begin Text Compare : [{CMD}] Starts With 'on'
Say, 'landing gear deployed'
Else
Say, 'landing gear retracted'
End Condition
Press 3 key and hold for 0,06 seconds and release
End Condition
In most cases using a suitable operator like "Contains", "Starts With", or "Ends With" is enough to differentiate between the different possibilities.
You can also consider which options are mutually exclusive, or have been ruled out already, and use a regular "Else", rather than an explicit "Else If", E.G. because if the phrase starts with "on", it logically cannot also start with "off".
That is something of a personal preference in this case, so you should go with the option that is most readable to you.
Press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer, which contains information on VoiceAttack's features.
These topics may also be of use:
Control flow (If, Else, ElseIf, Loop, Jump) basicsVariables and tokens summed up