English sv_sound command wont work?

6 replies
Goto Page
To the start Previous 1 Next To the start
03.01.11 12:23:37 pm
Up
Arne
User
Offline Off
I was trying to make a lua that opened a menu and you could choose a sound, the menu works just fine now, but it wont play the sounds.
Here's part of the code:
Code:
1
2
if button==1 then
parse ("sv_sound \"phant/wind.ogg\"")

I typed in console:
Code:
1
sv_sound phant/wind.ogg

and the sound played...
IMG:http://img17.imageshack.us/img17/2595/16237.gif
03.01.11 12:28:32 pm
Up
DrPyromatic
User
Offline Off
It would be useful when you say if a error message in the console shows and post it here.
Code:
1
2
if button==1 then
parse ('sv_sound \"phant/wind.ogg\"')

Or:
Code:
1
2
if button==1 then
parse ('sv_sound "phant/wind.ogg"')

I didn't test it, Iam not sure if it works.
03.01.11 12:30:50 pm
Up
Arne
User
Offline Off
DrPyromatic, I've tried both of those, and I can't see any LUA errors in the console.
IMG:http://img17.imageshack.us/img17/2595/16237.gif
03.01.11 12:45:27 pm
Up
DrPyromatic
User
Offline Off
I just checked the samples, what I wrote is wrong.
But anything should work, maybe something with the other script is wrong.
03.01.11 01:05:42 pm
Up
Arne
User
Offline Off
Could it be a problem with the addhooks?
IMG:http://img17.imageshack.us/img17/2595/16237.gif
03.01.11 02:04:48 pm
Up
Vetle
BANNED
Offline Off
Arne are you making a menu or what?
There will always be someone better than you.
03.01.11 02:33:44 pm
Up
freekillx02
User
Offline Off
Vetle, yes he making sound menu
To the start Previous 1 Next To the start