First, with SparkIV, export your WEAPONS.ivaud from resident.rpf (find it in
pc\audio\Sfx). Open the WEAPONS.ivaud with GTA IV-aud and import all sound files
to here (match the names):

M4_SHOT1_L
M4_SHOT1_R
M4_SHOT2_A
M4_SHOT2_B
M4_SHOT2_C
M4_SHOT2_D

Save once done and import back to resident.rpf, Save and close.

Now install this WeaponInfo to M4 line:

	<weapon type="M4">
		<data slot="RIFLE" firetype="INSTANT_HIT" damagetype="BULLET" group="RIFLE_ASSAULT" targetrange="30.0" weaponrange="500" clipsize="30" ammomax="270" timebetweenshots="66">
			<damage base="30" networkplayermod="2.5" networkpedmod="1.25"/>
			<physics force="43.75"/>
			<reload time="2066" fasttime="1166" crouchtime="2066"/>

			<aiming accuracy="0.65">
				<offset x="0.14" y="1.0" z="0.55"/>
				<crouchedoffset x="0.08" y="1.0" z="0.12"/>
				<reticule standing="0.6" ducked="0.5" scale="0.3"/>
			</aiming>

			<pickup regentime="480000" ammoonstreet="60"/>

			<controller>
				<rumble duration="140" intensity="0.4"/>
			</controller>

			<flags>
				<flag>GUN</flag>
				<flag>CAN_AIM</flag>
				<flag>2HANDED</flag>
				<flag>ANIM_RELOAD</flag>
				<flag>CAN_FREE_AIM</flag>
				<flag>ANIM_CROUCH_FIRE</flag>
			</flags>
		</data>

		<assets model="w_m4">
			<anim group="gun@ak47">
				<rates firerate="2.58" blindfirerate="2.58"/>
			</anim>
			<effects>
				<muzzle fx="muz_machine"/>
				<shell fx="weap_ejected_rifle"/>
			</effects>
		</assets>
	</weapon>
