Sound mod for burning

is there any gmod mods where when someone burns alive he would make a screaming or burning alive sound instead of the normal sounds

I don’t think this deserves to be an addon, I made it into a quick and customizable code:

local painSounds = {

     {"vo/npc/male01/pain0", 9}, --This will range from "vo/npc/male01/pain01.wav" to "vo/npc/male01/pain09.wav"
     {"vo/npc/male01/ow0", 2}  --This will range from "vo/npc/male01/ow01.wav" to "vo/npc/male01/ow02.wav"


hook.Add("EntityEmitSound", "Fire_Scream_Substitute", function(tab)

     if(tab.Entity:IsPlayer()) then --Is the entity emitting the sound a player?

          if(tab.Entity:IsFlagSet(FL_ONFIRE)) then --Is the player on fire?

               if(string.Left(tab.SoundName, 18) == "player/pl_burnpain") then --Is the sound being emitted the default burning scream?

                    if(tab.Entity.nextFireSound == nil || tab.Entity.nextFireSound <= CurTime()) then --Has enough time passed since the last scream?

                         local randomSound = table.Random(painSounds)

                         tab.SoundName = randomSound[1]..tostring(math.random(1, randomSound[2]))..".wav" --This pieces together the sound name

                         tab.Entity.nextFireSound = CurTime() + 1 --Next scream will happen in 1 second

                         return true --We modified the sound and let it play, we could just as well stop the sound and play one ourselves


                    return false --Do not play the default burning scream if not enough time has passed since the last scream





Just add it on an autorun file


i dont know how to code

:neutral_face: That’s why I did it for you.

ye but i dont know how to put things in the autorun file

its literally, steam/steamapps/common/GarrysMod/garrysmod/lua/autorun
open a text file paste that in the text file, save the file as, change it from .txt to All Files and type buringscreaming.lua or something and save
its just that

ye its not working

Enjoy !

It is working, I asked someone else (With no coding experience) to try it…
Just save it into a .lua file and put it into your lua/autorun folder

ye i did that