How to Insert HL2 Voice for ttt_radio commands ?

do anyone know how to make the person who select yes, no and help command release sound?

I’ve tried using


if c.cmd == "help" then
surface.PlaySound ( "vo/npc/male01/help01.wav" )

on cl_voice.lua inside GarrysMod\garrysmod\gamemodes errortown\gamemode including it on:


function RADIO:SendCommand(slotidx)
   local c = self.Commands[slotidx]
   if c then
      RunConsoleCommand("ttt_radio", c.cmd)
	   if c.cmd == "help" then
	   surface.PlaySound ( "vo/npc/male01/help01.wav" )
       end

      self:ShowRadioCommands(false)
   end
end

but it doesn’t release the sound. Anyone know how to insert this properly? please…?

First. I don’t think this is the fourm to post lua help.
Next, Are you sure this is on clientside?
Lastly, Did you use resource.AddFile(“filelocation”)?

The sound are actually based on Half Life 2, so they probably have it already inside their GMOD.
I just dont know how to config the radio.commands to emit sound like people shouting help, yes or no.

edit : I’ve tried inserting it on cl_voice.lua but there was 2 error that cant make the suit zoom commands to open that is


[ERROR] gamemodes/terrortown/gamemode/cl_hud.lua:336: attempt to index global 'VOICE' (a nil value)
  1. unknown - gamemodes/terrortown/gamemode/cl_hud.lua:336


[ERROR] gamemodes/terrortown/gamemode/cl_init.lua:340: attempt to index global 'RADIO' (a nil value)
  1. unknown - gamemodes/terrortown/gamemode/cl_init.lua:340

the line that i want to insert is like this



local helpsounds = {
Sound("vo/npc/male01/help01.wav"),
Sound("c17_09_help01.wav"),
Sound("c17_09_help02.wav"),
Sound("c17_09_help03.wav")
}

if cmd = "help" or text = "quick_help" then
	  sound.Play(table.Random(helpsounds))
	  end

im run out of ideas right now. Could anyone help me?