If you don't know about it already, here is our modding Frequently Asked Questions (FAQ) thread. It answers over a hundred commonly asked modding questions.
forums/viewtopic.php?f=27&t=13806
Loads of useful stuff in there for learning how to create new sides(teams).
Anyway. Your question.
Let's look at a stock, gun wielding here shall we?
Here is Han's ODF.
Now, you'll notice Han has 4 weapons. His pistol, a fusioncutter, detpacks and a defense buff.
Now the pistol and fusion cutter are Primary Weapons, and the detpack and defense buff are Secondary Weapons. Secondary Weapons are designated by the "WeaponChannel# = 1" line.
When adding new weapons you must remember to keep all of the numbers set up properly. You see Han has 4 WEAPONSECTIONs right now. The maximum is 8.
So the WEAPONSECTION, WeaponName, WeaponAmmo and WeaponChannel (if applicable) must have matching numbers, and the entire section must not be out of order.
For instance, you can not skip WEAPONSECTION = 3 and have 5 weapons (SECTIONS 1, 2, 4, 5, and 6). It will cause the game cease functioning properly.
Now with all that out of the way, let's say you want to give your hero a rifle. Let's find a rifle for him to use shall we? Let's go to the Alliance ODF folder, and look at the soldier's parent ODF with the important information (all_inf_default_rifleman). There you see the name of the rifle ODF you need, all_weap_inf_rifle.
Let's go back to our hero, and add the weapon in.
Assuming you have all the pertinent meshes and other assorted files you need, you can munge and test out your hero. Feel free to experiment around and see what does and doesn't work, and read through the important side creation tutorials in the FAQ.