Try to go to \Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\SA342\Input\joystick
There go inside the default wiht notepad++ and copy this line:
{combos = {{key = 'JOY_BTN1'}}, down = iCommandPlaneFire, up = iCommandPlaneFireOff, value_down = 1, valueup = 0, name = ('SA342 Fire Gun or Rocket'), category = _('SA342 Pilot Stick')},
and paste it in your:
C:\Users\YourUser\Saved Games\DCS.openbeta\Config\SA342\joystick\thejoystickyouwanttohavethe function