1

No custom sound files are played, but in-game sound files are played. Sound file has 44100Hz I have tried stereo and mono mp3 and ogg I have also tried

local soundFile = "addons/testaddon/sound/testsound.wav"

hook.Add("KeyPress", "myTestAddon", function(ply, key)
    if key == IN_JUMP then
        sound.Play(soundFile, ply:GetPos(), 75, 100, 1)
        print("Test")
    end
end)

1 Answers1

1

This should be [...] a file path relative to the sound/ folder.

https://wiki.facepunch.com/gmod/sound.Play

In your case just use "testsound.wav".

Luke100000
  • 1,395
  • 2
  • 6
  • 18