I'm working on a mod and I need help,

In my mod we can choose weapon with a menu, but we can always take gun then we have like 8 guns. I want the maximun gun number is 2