As previously noted
here, one thing to watch for on the IPac4
default keymap is that inputs 2SW5-2SW8 (Player 2 buttons 5-8) come mapped to the same keystrokes (I, K, J, and L) as the P3 joystick directions.

If you don't change the defaults, P2 can press button 5 or 6 and move P3 up or down.

I recommend reprogramming the IPac's P2 buttons 5-8 since they come undefined in MAME (no associated defaults) -- HOME, END, PAGE UP, and PAGE DOWN keys aren't used by MAME and would be good choices AFAIK.
For easiest setup, you'll probably want to define the new keys in MAME's "Input (general)" menu instead of manually configuring
all of the 5 or 6 button games.

is the Exit/Pause a master control for everyone?
Yes, 1 pause and 1 exit button is usually shared by all 4 players -- be sure that the pause and exit buttons aren't too close to any coin or start buttons to avoid accidental presses during vigorous gameplay.
so player 3 and 4 would have 4 buttons + player, coin?
Each player gets their own coin and start button.
Scott