While following these instructions it can help to have a picture of the real M4 Carbine in front of you. A decent picture can be found on Colt's web site at http://www.colt.com/mil/M4.asp.
Begin by drawing a horizontal line. This line will be the entire length of the rifle, from the tip of the barrel to the end of the butt. This line will also be the line bullets fired from the rifle travel along.
The rifle is divided into four main parts: the thin end of the barrel, the think part of the barrel, the main segment of the gun and the butt. These parts are all roughly the same length, so divide your line into four equal parts.
The easiest part is the thin end of the barrel. Starting at the very tip, lightly draw a rectangle around your line. The rectangle should be about five times as long as it is high. Now, divide the rectangle up into three segments, the middle segment being slightly longer than the other two. Connect each of the segment boundaries with a much shorter/less tall line. Centre these shorter lines along the firing line that you drew in the beginning. Make your final segment slightly less tall than the other two.
To complete the first section, draw a right-angled triangle half the width of the third segment, with the flat end facing whatever the gun will be shooting at. The triangle should be about twice as high as the taller segments of the barrel.
The second segment of the gun is a ribbed cylinder, cantered along the original firing line. The user of the gun holds the barrel by this part with his non-trigger hand. Shape the cylinder so that it curves backwards gently at the front end and is flat at the back end. The cylinder should be about twice as tall as the large segments you drew earlier.
Next we will draw the butt of the rifle. Start at the front end with a small connector, used to attach the butt to the main part of the rifle's body - draw it as tall as the first segments you drew.
Gently sketch in a rectangle, centred on the line, slightly shorter than the cylinder in part 2. This rectangle should continue to the very end of the line you drew in the beginning.
Starting at the very end of the rifle, draw a line from the bottom corner of this rectangle, continuing down for almost the entire height of the rectangle. Connect the end of this line to the bottom edge of the rectangle, about a third of the way along it from the back end of the gun.
From this point, draw another short vertical line and connect it up to the bottom edge of the rectangle so that it is parallel with the previous diagonal line.
To finish the butt, draw a small rectangular protrusion at the top-back of the rectangle. Make this new shape hollow.
This is the complicated part. Start off with a rectangle centred about the firing line, the height of the cylinder and the length of the segment. Draw a hollow trapezium on top of this, slightly shorter than the height of your new rectangle.
Draw a shallow curve extending beneath the new rectangle, bunched slightly towards the butt. Draw an ovoid gap towards the butt of this bulge, and place the trigger inside it. Draw the handle of the gun as a rectangle sticking out from behind the trigger, at an angle of about 60 degrees from the firing line. The handle should be slightly less tall than the very end of the rifle butt.
From the front of the bulge, draw the ammunition cartridge, It should curve towards the front of the gun and extend downwards almost twice as much as the handle. The clip should be as wide as the cylinder is tall.
You have now drawn the outline of the rifle. When shading, make sure that it is clear that there is a long tube running from where the clip reaches the main segment all the way to the end of the barrel. It also helps to make the front half of the main segment (the chamber) stick out sideways slightly more than the back half: this is where the exploding whatyoumacallit takes place.