Hey! I'm trying to create a [URL="https://wiki.garrysmod.com/page/Category:DNumSlider"]DNumSlider[/URL] that changes the cvar called voice_scale to let players adjust other players' voice volume easily from that derma. The problem is that when I try to do this
[CODE]GetConVar("voice_scale"):SetInt(value)[/CODE] It says calling 'SetInt' on bad self (attempt to modify ConVar not created by Lua)
And if I try
[CODE]RunConsoleCommand( "voice_scale", value )[/CODE]
It says
RunConsoleCommand: Command is blocked! (voice_scale)
Is there another way I can modify other players' mic volume?
Thank you!
[IMG]http://wiki.garrysmod.com/favicon.ico[/IMG] [URL="http://wiki.garrysmod.com/page/Player/VoiceVolume"]Player:VoiceVolume[/URL]. Only ever change a clientside cvar if you don't have any other choice.
[QUOTE=txike;52882979][img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Player/VoiceVolume]Player:VoiceVolume[/url][/QUOTE]
That is a function that RETURNS a number that is the volume of the player.
Looks like you're going to have to find a way to manipulate player voice volume with code and not with a cvar.
[QUOTE=angrytoiletry;52883027]Looks like you're going to have to find a way to manipulate player voice volume with code and not with a cvar.[/QUOTE]
Yea, I'm asking if anyone knows a way to do so :]
The voice system is extremely limited from the Lua state and there is no way to change the audio stream at all. Refer to [url]https://github.com/Facepunch/garrysmod-requests/issues/647[/url]
Thanks for your answer!
Sorry, you need to Log In to post a reply to this thread.