====================================================================
IMI Galil Sniper Rifle
Converted from Fallout 3 to GTAIV by X42.0
Credits for model, textures and sounds goes to their original author(s)!
====================================================================

Note: I am assuming for the most part that the reader does not know how to install mods for GTAIV, so I try to explain each step very thoroughly to avoid any confusion!

==================
INSTALLING THE GUN
==================

	Download OpenIV (google it) if you don't have it
	Run OpenIV, go to models>cdimages at the left, and double click on weapons.img at the right
	Click on Edit Mode near the top, or else you can't change anything
	Navigate to the folder my mod is in, and drag w_psg1.wdr and w_psg1.wtd into the OpenIV window
	Double click on w_psg1.wdr and the gun should show up correctly. If not, repeat step 4 because something went wrong.
	

You now have the gun model and textures installed, but you aren't done yet!


=====
SOUND (If you don't care about/are too lazy to install the gunshot sound skip down to WEAPONINFO.)
=====

	Download GTA-IVaud and run it
	Follow the SparkIV steps above to get to RESIDENT\WEAPONS.ivaud and EXPORT it (keep this window open for later)
	Open the exported WEAPONS.ivaud in GTA-IVaud
	Click on SNIPERRIFLE_SHOT2_L.wav, then click Edit>Import WAV, and navigate to where the FG 42 folder is
	Double click on SNIPERRIFLE_SHOT2_L.wav.wav and click yes to any messages that pop up
	Repeat for SNIPERRIFLE_SHOT2_R.wav
	Save
	Now you have to Import the recently saved WEAPONS.ivaud in SparkIV, and remember to SAVE!


==========
WEAPONINFO
==========

Go to Common\Data\Weaponinfo.xml, make a copy of it for backup, right click on it and hit properties, untick "Read Only" and hit apply. Open it in the text editor of your choice (Notepad++ ftw). Scroll down until you find <weapon type="SNIPERRIFLE">. 
Replace all the lines from <weapon type="SNIPERRIFLE"> to </weapon> with the following:

	<weapon type="M40a1">
		<data slot="SNIPER" firetype="DELAYED_HIT" damagetype="BULLET" group="RIFLE_SNIPER" targetrange="50.0" weaponrange="850.0" clipsize="20" ammomax="100" timebetweenshots="333">
			<damage base="110" fps="100" networkplayermod="2.0" networkpedmod="1.0"/>
			<physics force="0.9"/>
			<reload time="1300" fasttime="2066" crouchtime="2066"/>

			<aiming accuracy="10.0" accuracyfps="0.0">
				<offset x="0.16" y="1.0" z="0.55"/>
				<crouchedoffset x="0.16" y="1.0" z="0.12"/>
				<reticule standing="0.6" ducked="0.5" scale="0.05"/>
			</aiming>

			<pickup regentime="360000" ammoonstreet="10"/>

			<controller>
				<rumble duration="120" intensity="0.3"/>
			</controller>

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

		<assets model="w_rifle">
			<anim group="gun@rifle"/>
		</assets>
	</weapon>