How to set a guns reload sounds

Hello, I have got a custom weapon here, just a basic weapon but when I reload it, the reload sounds do not play however, the shoot sound does.

After a little research I found this:

[lua]
local h3 = {}
h3[“channel”] = CHAN_WEAPON
h3[“level”] = SNDLVL_GUNFIRE
h3[“sound”] = “weapons/spas/spas12-1.wav”
h3[“name”] = “Weapon_H3.Single”
h3[“script”] = “scripts/sounds/hl2_game_sounds_weapons.txt”
[/lua]

This was in the guns shared.lua file, how would I go about using this to fix my guns reload sounds not working? Or is there any other alternatives?


function SWEP:Reload()
     self:EmitSound("Sound.wav", 75, 100)
end

I think this is how you create a reload sound.

I understand that, but how would I create a delay between sounds? I am come from a background from lots of Python coding and in that I always used something like time.wait(number in seconds) but I understand that is not in lua.

You could create a time like so


function SWEP:Reload()
     timer.Create( "reload_timer", "InsertDelayTimeHere", 1, function()
	    self:EmitSound("Sound.wav", 75, 100)
     end)
end

Keep the 1 in the “timer.Create” code or else if you put it to another number, for example 5, the timer will keep running 5 times then it will stop.

Thanks very much, exactly what I was looking for!