Due to no one else offering support on this one I'll offer what advice I can
I don't have much experience with controllers but here goes.
You need to create some way for the computer to know that Robot_A is free. A local variable to say he's waiting for a his controls would work here.
Next you need a way to be able to say which pad has pressed a button 1st, some global variables might be helpful here.
When a global variable is equal to a robots local variable then that robot can be assigned that pads control scheme.
You might need to provide some more information to get a more accurate answer from someone who is more experienced in controllers then me.
It would be far easier just to assign Robot_A to Pad_0, Robot_B to Pad_1 etc