My gun does not play sound when shooting

i am new to this lua a friend taught me but the problem is this creates a weapon I think everything is fine but when I shoot I do not play sound

This is the shared.lua

SWEP.Category = “Azael Weapons”
SWEP.PrintName = “hkmp5”
SWEP.Author = “Azael12”
SWEP.Purpose = “kill”
SWEP.MuzzleAttachment = 3
SWEP.ShellEjectAttachment = 1
SWEP.HoldType = “smg”
SWEP.ViewModelFlip = true
SWEP.ViewModelFOV = 70
SWEP.WeaponDeploySpeed = 0.8
SWEP.Base = “shain_new_base”
SWEP.Spawnable = true
SWEP.AdminSpawnable = true
SWEP.Slot = 3
SWEP.SlotPos = 1
SWEP.IconLetter = “g”
SWEP.FiresUnderwater = true
SWEP.ViewModel = “models/weapons/v_smg_mp5.mdl”
SWEP.WorldModel = “models/weapons/w_smg_mp6.mdl”
SWEP.Primary.Cone = 0.02
SWEP.Primary.Sound = Sound(“weapons/pistol/mp5-1.wav”)
SWEP.Primary.KickUp = -3.00
SWEP.Primary.KickDown = -3.00
SWEP.Primary.KickHorizontal = 1.00
SWEP.Primary.Damage = 78
SWEP.Primary.NumShots = 1
SWEP.Primary.ClipSize = 30
SWEP.Primary.Delay = 0.1
SWEP.Primary.DefaultClip = 200
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = “SMG1”
SWEP.Primary.Tracer = 1
SWEP.Primary.Force = 2000
SWEP.ViewKick = 0.07

SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = “”

function SWEP:Deploy()

self.Weapon:EmitSound(“hl2_base_sounds/draw.wav”)
self.Weapon:SendWeaponAnim( ACT_VM_DRAW )

self.Reloadaftershoot = CurTime() + 1
self.Weapon:SetNextPrimaryFire(CurTime() + 1)

return true

end

function SWEP:Reload()
self.Weapon:DefaultReload( ACT_VM_RELOAD )

if self.Weapon:DefaultReload() then
self.Weapon:EmitSound(“weapons/smod_m1garand/garand_reload_clipding.wav”)
end
self:SetIronsights( false )
end

this is the basis shain_new_base

(CODE // give credit if u use this base
if (SERVER) then

AddCSLuaFile( "shared.lua" )
SWEP.Weight				= 5
SWEP.AutoSwitchTo		= false
SWEP.AutoSwitchFrom		= false

end

if ( CLIENT ) then

SWEP.DrawAmmo			= true
SWEP.DrawCrosshair		= false
SWEP.ViewModelFOV		= 82
SWEP.ViewModelFlip		= true
SWEP.CSMuzzleFlashes	= true
SWEP.CT 			= "sprites/ch1"


surface.CreateFont( "csd", ScreenScale( 30 ), 500, true, true, "CSKillIcons" )
surface.CreateFont( "csd", ScreenScale( 60 ), 500, true, true, "CSSelectIcons" )

end

SWEP.Author = “jalafjalav”
SWEP.Contact = “”
SWEP.Purpose = “”
SWEP.Instructions = “”

SWEP.Spawnable = false
SWEP.AdminSpawnable = false

SWEP.Primary.Sound = Sound( “Weapon_AK47.Single” )
SWEP.Primary.Recoil = 0
SWEP.Primary.Damage = 40
SWEP.Primary.NumShots = 1
SWEP.Primary.Cone = 0.02
SWEP.Primary.Delay = 0.15
SWEP.Primary.Tracer = 0
SWEP.Primary.Force = 0
SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = “none”
SWEP.ViewKick = 0.4
SWEP.PunchDir = 1

SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = “none”

function SWEP:Initialize()

if ( SERVER ) then
	self:SetNPCMinBurst( 0.01 )
	self:SetNPCMaxBurst( 0.04 )
	self:SetNPCFireRate( 0.1 )
end

self:SetWeaponHoldType( self.HoldType )
self.Weapon:SetNetworkedBool( "Ironsights", false )

end

function SWEP:Reload()
self.Weapon:DefaultReload( ACT_VM_RELOAD );
self:SetIronsights( false )
end

function SWEP:Think()
end

function SWEP:PrimaryAttack()

self.Weapon:SetNextSecondaryFire( CurTime() + self.Primary.Delay )
self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay )

if ( !self:CanPrimaryAttack() ) then return end


self.Weapon:EmitSound( self.Primary.Sound )

self.PunchDir = Angle(-1,math.random(-1,1),0)

self:CSShootBullet( self.Primary.Damage, self.Primary.NumShots, self.Primary.Cone )

self.Owner:SetEyeAngles(self.Owner:EyeAngles()+self.PunchDir*self.ViewKick)

self:TakePrimaryAmmo( 1 )

if ( self.Owner:IsNPC() ) then return end



if ( (SinglePlayer() && SERVER) || CLIENT ) then
	self.Weapon:SetNetworkedFloat( "LastShootTime", CurTime() )
end

end

function SWEP:CSShootBullet( dmg, numbul, cone )

numbul 	= numbul 	or 1
cone 	= cone 		or 0.01

local bullet = {}
bullet.Num 		= numbul
bullet.Src 		= self.Owner:GetShootPos()			// Source
bullet.Dir 		= self.Owner:GetAimVector()			// Dir of bullet
bullet.Spread 	= Vector( cone, cone, 0 )			// Aim Cone
bullet.Tracer	= self.Primary.Tracer									// Show a tracer on every x bullets 
bullet.Force	= self.Primary.Force										// Amount of force to give to phys objects
bullet.Damage	= dmg

self.Owner:FireBullets( bullet )
self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) 		// View model animation
self.Owner:MuzzleFlash()								// Crappy muzzle light
self.Owner:SetAnimation( PLAYER_ATTACK1 )				// 3rd Person Animation

if ( self.Owner:IsNPC() ) then return end

self.Owner:SetEyeAngles(self.Owner:EyeAngles()+self.PunchDir*self.ViewKick)

end

function SWEP:DrawWeaponSelection(x, y, wide, tall, alpha)

surface.SetDrawColor(255, 255, 255, alpha)
surface.SetTexture(self.WepSelectIcon)

local fsin = 0

if (self.BounceWeaponIcon == true) then
	fsin = math.sin(CurTime() * 10) * 5
end

y = y + 10
x = x + 10
wide = wide - 20

surface.DrawTexturedRect(x + (fsin), y - (fsin), wide - fsin * 2, (wide / 2) + (fsin))

self:PrintWeaponInfo(x + wide + 20, y + tall * 0.95, alpha)

end

local IRONSIGHT_TIME = 0.25

function SWEP:GetViewModelPosition( pos, ang )

if ( !self.IronSightsPos ) then return pos, ang end

local bIron = self.Weapon:GetNetworkedBool( "Ironsights" )

if ( bIron != self.bLastIron ) then

	self.bLastIron = bIron 
	self.fIronTime = CurTime()
	
	if ( bIron ) then 
		self.SwayScale 	= 0.3
		self.BobScale 	= 0.1
	else 
		self.SwayScale 	= 1.0
		self.BobScale 	= 1.0
	end

end

local fIronTime = self.fIronTime or 0

if ( !bIron && fIronTime < CurTime() - IRONSIGHT_TIME ) then 
	return pos, ang 
end

local Mul = 1.0

if ( fIronTime > CurTime() - IRONSIGHT_TIME ) then

	Mul = math.Clamp( (CurTime() - fIronTime) / IRONSIGHT_TIME, 0, 1 )
	
	if (!bIron) then Mul = 1 - Mul end

end

local Offset	= self.IronSightsPos

if ( self.IronSightsAng ) then

	ang = ang * 1
	ang:RotateAroundAxis( ang:Right(), 		self.IronSightsAng.x * Mul )
	ang:RotateAroundAxis( ang:Up(), 		self.IronSightsAng.y * Mul )
	ang:RotateAroundAxis( ang:Forward(), 	self.IronSightsAng.z * Mul )


end

local Right 	= ang:Right()
local Up 		= ang:Up()
local Forward 	= ang:Forward()



pos = pos + Offset.x * Right * Mul
pos = pos + Offset.y * Forward * Mul
pos = pos + Offset.z * Up * Mul

return pos, ang

end

function SWEP:SetIronsights( b )

self.Weapon:SetNetworkedBool( "Ironsights", b )

end

SWEP.NextSecondaryAttack = 0

function SWEP:SecondaryAttack()

if ( !self.IronSightsPos ) then return end
if ( self.NextSecondaryAttack > CurTime() ) then return end

bIronsights = !self.Weapon:GetNetworkedBool( "Ironsights", false )

self:SetIronsights( bIronsights )

self.NextSecondaryAttack = CurTime() + 0.3

end

function SWEP:DrawHUD()

if ( self.Weapon:GetNetworkedBool( “Ironsights” ) ) then return end

local tex=surface.GetTextureID(self.CT)
surface.SetTexture(tex)
surface.SetDrawColor(255,255,255,255)
surface.DrawTexturedRect( ScrW() *0.5 -16, ScrH() *0.5 -16, 35, 30)
end

function SWEP:OnRestore()

self.NextSecondaryAttack = 0
self:SetIronsights( false )

end

function SWEP:Deploy()

self.Weapon:EmitSound(“hl2_base_sounds/draw.wav”)
self.Weapon:SendWeaponAnim( ACT_VM_DRAW )

self.Weapon:SetNextPrimaryFire(CurTime() + 1)

return true

end

function SWEP:ShouldDropOnDie()
return true
end

function SWEP:Holster()
return true
end

SWEP.IronSightZoom = 1
CODE)

I would like to know why you do not hear the shot
I wish I could help
forgiveness for my English is not my first language

I’m not good at SWEPS yet but I will ask this: Any errors in in-game console / server console?

Hopefully you can get this resolved. Sorry I cannot help you. :frowning:

Also, if you dont mind use “CODE /CODE” or “lua /lua” around your code.

Put brackets around them.