Weapon modding may sound hard, but in fact it is extremely easy and I will provide a step-by step walkthrough on what to do. This method was done on a Mac, but it will work for PC as well.
Locate the Call of Duty 4 folder on your computer.
Open it, then go to the "Call of Duty 4 Data" folder.
Locate the "main" folder and open it
Locate the "iw_11.iwd" file, and change the extension to "iw_11.iwd.zip"
Open the zip folder. You should now have a folder called "iw_11.iwd".
Open up the folder and find the "weapons" folder.
Now copy the "weapons" folder.
Go back to the "Call of Duty 4 Data" folder and find the folder called "Mods".
Open it, and open the "ModWarfare" folder.
Inside this folder, paste the "weapons" folder.
Open up the weapons folder, then open up the "mp folder".
Inside you will find coding for every singe weapon folder in the game. Find the weapon you want to mod, and open it. I'll open "ak47_acog_mp"
You will see a huge jumble of code. If you mess up, do not worry, simply delete the whole "weapons" folder from the "ModWarfare" folder, and then re-copy and paste it from the "iw_11.iwd" folder. You can open this with TextEdit on a Mac, and WordPad on a PC.
This coding is pretty much a load of variables one can change to change the weapon in-game. Lets change this weapon to a 3-round burst mode.
Want a bigger magazine? Let's give this AK a 100-round magazine.
Find yourself running out of ammo? Then let's change that. 10000 rounds should be enough.
Go ahead and save that, you now have yourself an AK47 ACOG scope with a 100 round magazine and 10000 rounds of ammo.
Always wanted a machine pistol in CoD4? Well now's your chance. Locate the "beretta_mp" file in the "weapons" folder.
Open it up, and make it automatic. Save it, and you have yourself a class with a modded AK47 and M9!
Now, we open up CoD4 multiplayer, and go to the "Mods" option.
Select "ModWarfare" and open it.
Now start a private server, create the class with the AK47 ACOG and M9, and look at your results.
This technique can be expanded to make every single weapon to your specifications. Of course, because the coding is so unorganized it is very easy to make mistakes, but if you're careful with it is's very simple and yields some fun results. Note that you can't actually use these mods in a public server, but that's good because otherwise we'd be seeing automatic Barretts and MP5s with a ROF of 2000RPM everywhere.
Here are a few screenshots of what you can do:
The modded AK47, note the large magazine and high ammo count.
An automatic M9 with a 100-round magazine
The result of shooting 100 rounds from long range with a 0-recoil mod
I ran into this problem when I aimed down the ACOG scope, this is why it's good to keep a backup "weapons" folder.
There are many variables which can be changed, but I will list the main ones.
\fireType\ - This is how the weapon will fire. Single Shot for semiautomatic, Full Auto for fully automatic, and 3-Round Burst for 3-round burst.
\maxAmmo\ - The max ammo you can have for that weapon.
\startAmmo\ - The starting ammo you can have.
\clipSize\ - This is the magazine size for the weapon.
\adsViewKickPitchMin\0\adsViewKickPitchMax\0\adsViewKickYawMin\0\adsViewKickYawMax\0 - This gives the weapon 0 recoil, with careful copy and pasting this can be applied to all weapons.
\fireTime\ - Lowering the variable will give the weapon a higher rate of fire. A fireTime of 0.05 gives the player a rate of fire of 1200 RPM, A fireTime of 0.01 gives a rate of fire of 6000 RPM. Tip - aiming at the sky gives a much higher FPS rate and makes the rate of fire more obvious. General formula = 60/T where T is the value of \fireTime\
These are the most basic ones to change and before you do anything more complex, it's advised you stick with these variables.
If you have any more questions/problems, feel free to ask them on the talk page.