How do you use custom sounds?

All i need help with is the code. i have no idea what to put in it to make the custom sounds work. Please someone help me out.



// Variables that are used on both client and server

SWEP.Base 				= "weapon_mad_base"
SWEP.Category                   = "Modern Rilfes"


SWEP.ViewModel			= "models/weapons/v_rif_M16a4.mdl"
SWEP.WorldModel			= "models/weapons/w_rif_M16a4.mdl"

SWEP.Spawnable			= true
SWEP.AdminSpawnable		= false

SWEP.Primary.Sound 		= Sound("Weapons/M16a4/M16a4-1.wav")
SWEP.Primary.Recoil		= 0.5
SWEP.Primary.Damage		= 17
SWEP.Primary.NumShots		= 1
SWEP.Primary.Cone			= 0.015
SWEP.Primary.Delay 		= 0.075

SWEP.Primary.ClipSize		= 20					// Size of a clip
SWEP.Primary.DefaultClip	= 20					// Default number of bullets in a clip
SWEP.Primary.Automatic		= true				// Automatic/Semi Auto
SWEP.Primary.Ammo			= "AirboatGun"

SWEP.Secondary.ClipSize		= -1					// Size of a clip
SWEP.Secondary.DefaultClip	= -1					// Default number of bullets in a clip
SWEP.Secondary.Automatic	= false				// Automatic/Semi Auto
SWEP.Secondary.Ammo		= "none"

SWEP.ShellEffect			= "effect_mad_shell_rifle"	// "effect_mad_shell_pistol" or "effect_mad_shell_rifle" or "effect_mad_shell_shotgun"
SWEP.ShellDelay			= 0

SWEP.Pistol				= false
SWEP.Rifle				= true
SWEP.Shotgun			= false
SWEP.Sniper				= false

SWEP.IronSightsPos 		= Vector (-4.687, 2.3092, 1.3322)
SWEP.IronSightsAng 		= Vector (0.4011, -0.0735, -0.8375)
SWEP.RunArmOffset 		= Vector (1.7661, -3.2645, 1.9996)
SWEP.RunArmAngle	 		= Vector (-19.3086, 29.9962, 0)

SWEP.Burst				= true
SWEP.BurstShots			= 3
SWEP.BurstDelay			= 0.05
SWEP.BurstCounter			= 0
SWEP.BurstTimer			= 0

SWEP.Type				= 3
SWEP.Mode				= true

SWEP.data 				= {}
SWEP.data.NormalMsg		= "Switched to Auto."
SWEP.data.ModeMsg			= "Switched to burst fire mode."
SWEP.data.Delay			= 0.5
SWEP.data.Cone			= 0.75
SWEP.data.Damage			= 1
SWEP.data.Recoil			= 1

/*---------------------------------------------------------
   Name: SWEP:Precache()
   Desc: Use this function to precache stuff.
---------------------------------------------------------*/
function SWEP:Precache()

    	util.PrecacheSound("weapons/M16a4/M16a4-1.wav")
end


There is no reload sound specified in this.

[lua]SWEP.Primary.Sound = Sound(“path/to/sound/file”)[/lua]

Also, it won’t work if the sound isn’t encoded to 44100 Hz, I believe.

That’s why i am asking. Can anyone help me set them up?

Get audacity

That’s jsut an editing and sound makeing program isent it? how does that help me add the code to the script for custom sounds. I allready have them in the sound foldier.