so for this to work in mame you need to set the guns the same way as teknoparrot,
joystick mode 3, nunchuks required
in mame game settings, input devices, ensure wiimotes are positioned 1 to 4 in joystick column (you may need to create a ctrlr.cfg file for this)
pay attention to the 2 different types of gun input in mame, lightgun X or Y and AD STICK X or Y
this is where you set the axis like in the picture
joy 1 button 3 is trigger
joy 1 button 6 is large button on the nunchuk
joy 1 button 7 is small button on the nunchuk
your button might have a different number but just set it how you want
hope this makes sense