AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to detect MP3Volume change from console and settings ? (https://forums.alliedmods.net/showthread.php?t=307067)

TBagT 04-25-2018 09:25

How to detect MP3Volume change from console and settings ?
 
Hello guys,

I was wondering how could I get notified when user changes his MP3Volume setting ? I created a music plugin which allows player to increase volume in a menu. I use query_client_cvar( ) on client_putinserver( ) but if player changes the sound not in the created menu but in console or settings the volume variable doesn't refresh. client_infochange didn't work so I thought maybe there's another way of hooking this ?

Thanks.

klippy 04-25-2018 09:47

Re: How to detect MP3Volume change from console and settings ?
 
I believe there isn't a way to do that.

TBagT 04-25-2018 10:01

Re: How to detect MP3Volume change from console and settings ?
 
Setting task every 5s to query_client_cvar( ) would not be the smartest idea ? :D

klippy 04-25-2018 15:28

Re: How to detect MP3Volume change from console and settings ?
 
I mean you can do that, but I don't really see a reason would you. Just let them change it through console or options menu.

TBagT 04-25-2018 23:19

Re: How to detect MP3Volume change from console and settings ?
 
Well the plugin displays players current volume if it was changed not from the menu but from console or options it doesn't refresh.

fysiks 04-26-2018 21:29

Re: How to detect MP3Volume change from console and settings ?
 
Quote:

Originally Posted by TBagT (Post 2589429)
Well the plugin displays players current volume if it was changed not from the menu but from console or options it doesn't refresh.

He was saying that such a thing is pointless.

Simply query the cvar when you need it.


All times are GMT -4. The time now is 04:43.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.