How do I make a shotgun reload make the sound per bullet?

I’m using Mad Cows weapon base and I’m using custom sounds, but I cant make a reload work correctly.

This is the code:


  1. The reload animation happens, but It either makes no reload sound or multiple shell loading sounds. I’m trying to get it so it makes a shell loading sound depending on the bullets needed (If I shot 2 bullets, it should make 2 shell loading sounds).

  2. When I reload an empty clip, the first shell is 2 bullets (it goes from 0 bullets to 2)

Any fixes for this? Gmod wiki doesn’t have an answer for these problems.

Since you’re using Mad Cow, why not just use the SPAS 12 or the Pumpshotgun as a template and just change things from there?

Worked for me.

I’ve done that ,but it doesnt make a difference

wrong section… should be in lua coding

(User was banned for this post ("Unhelpful reply" - Benji))

try changing:
SWEP.Primary.Sound = Sound(“weapons/shotgun_chrome/gunfire/shotgun_fire_1.wav”)
SWEP.Primary.Reload = Sound(“weapons/shotgun/gunother/shotgun_load_shell_4.wav”)
SWEP.Primary.Sound = “weapons/shotgun_chrome/gunfire/shotgun_fire_1.wav”
SWEP.Primary.Reload = “weapons/shotgun/gunother/shotgun_load_shell_4.wav”

If that doesnt work, use this

function SWEP:Reload()

if self:Ammo1() > 0 and self.Weapon:Clip1() < self.Primary.ClipSize then  


Thanks, but neither of those work exactly right
The first one doesn’t do anything
he second one cause the reload to take 1 second, which means that its like reloading per clip, not per shell.

I looked into the second code, and I came up with something, but it doesnt work well. Is there anyway I can get the code to say "if self:Ammo1() > 0 < 1 and self.Weapon:Clip1() < self.Primary.ClipSize then (meaning if its from 0 to 1) without it being written as so?