• How to Insert HL2 Voice for ttt_radio commands ?
    3 replies, posted
do anyone know how to make the person who select yes, no and help command release sound? I've tried using [CODE]if c.cmd == "help" then surface.PlaySound ( "vo/npc/male01/help01.wav" )[/CODE] on cl_voice.lua inside GarrysMod\garrysmod\gamemodes\terrortown\gamemode including it on: [CODE]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[/CODE] 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 [CODE][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[/CODE] the line that i want to insert is like this [CODE] 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[/CODE] im run out of ideas right now. Could anyone help me?
Sorry, you need to Log In to post a reply to this thread.