SWEP Empty sound

Hello, i made a swep that has temp ammo list inside it like all other sweps, the ammo list is simple and is a number

ammoc = 14

whenever i shoot the gun, it takes one from ammoc

printing ammoc in console works fine, but whenever i try to shoot my gun it never sounds, here is some parts of my swep:

On my shoot bullet function:
[lua]
self.Weapon:EmitSound(self.sound)
[/lua]

On my deagle:
[lua]
SWEP.sound = Sound(“Weapon_Deagle.Single”)
[/lua]

I think the CanPrimaryAttack function broke it, here is my CanPrimaryAttack:
[lua]
function SWEP:CanPrimaryAttack()
if(CurTime()<self.Weapon.lastshoot+self.delay)then
return false
end

if not(tobool(self.Weapon.ammoc))then
	self:EmitSound("Weapon_Pistol.Empty")
	self.Weapon.lastshoot=CurTime()+0.3
	return false
end

return true

end
[/lua]

What i see in game is:

No bullet on any walls whenever i shoot, gun moves up and down and pushes some junk bullets but never plays sound and no bullets on the wall i shoot, works fine with shooting players, it damages them but still is same.

This might be useful (On Shoot bullet function):
[lua]
local bullet = {}
bullet.Num =1
bullet.Src =self.Owner:GetShootPos()
bullet.Dir =self.Owner:GetAimVector()
bullet.Spread =Vector(0.4,0.4,0)
bullet.Tracer =1
bullet.TracerName=“Tracer”
bullet.Force =10
bullet.Damage =34

if(self.Weapon.ammoc&gt;0)then
	self.Owner:FireBullets(bullet)
	self.Weapon.ammoc=self.Weapon.ammoc-1
end

[/lua]

Thanks

Can you explain why you are using custom variable for ammo, instead of built-in functions?

[editline]23rd July 2013[/editline]

Make sure your sound is played on both client AND server.

About ammo, It’s a custom system more like pointshop which takes ammo from player without using any ammo base,

There’s no if SERVER then return end on PrimaryAttack
SWEP was working fine before GMod 13, but now it doesn’t work well, Functions are fine there’s no error at all.

The ammo showing is downside near SWEP:HUD, do you think moving the ammo changing to SWEP:Think would work? I tried self.Owner:Health() for HUD, worked fine, but doesn’t work well for ammo, ammo works fine in console, but not in HUD