Raised This Month: $32 Target: $400
 8% 

OnClientSettingsChanged


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FroL
Member
Join Date: Jul 2007
Old 10-03-2008 , 05:18   OnClientSettingsChanged
Reply With Quote #1

Can I use "OnClientSettingsChanged" for a specific client's cvar? It would be very useful fucher...
__________________

3SMedia #1 | classic gameplay | tick 100 (81.25.49.19:27015)
3SMedia #2 | pro gaming | tick 100 (81.25.49.19:27016)
3SMedia #3 | deathmatch | tick 100 (81.25.49.19:27017)
Sorry for my VERY bad english .
FroL is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 10-03-2008 , 05:41   Re: OnClientSettingsChanged
Reply With Quote #2

I doubt it, it's probably meant for sm_settings. You have to use QueryClientConVar for checking a client's cvar value.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
FroL
Member
Join Date: Jul 2007
Old 10-03-2008 , 06:56   Re: OnClientSettingsChanged
Reply With Quote #3

Quote:
I doubt it, it's probably meant for sm_settings
I'm tested this. "OnClientSettingsChanged" calls, when client changes any cvar (name or cl_cmdrate, for example)..
Quote:
You have to use QueryClientConVar for checking a client's cvar value.
Hmmm... I'm using GetClientInfo for this purpose...
__________________

3SMedia #1 | classic gameplay | tick 100 (81.25.49.19:27015)
3SMedia #2 | pro gaming | tick 100 (81.25.49.19:27016)
3SMedia #3 | deathmatch | tick 100 (81.25.49.19:27017)
Sorry for my VERY bad english .
FroL is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 10-03-2008 , 07:15   Re: OnClientSettingsChanged
Reply With Quote #4

Then what's your question? If OnClientSettingsChanged is called when a client changes a cvar, and you can get the cvar value with GetClientInfo, then you're done right?
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
FroL
Member
Join Date: Jul 2007
Old 10-03-2008 , 07:42   Re: OnClientSettingsChanged
Reply With Quote #5

My question is:
Quote:
Can I use "OnClientSettingsChanged" for a specific client's cvar?
For example: client changes cvar "name" and this action call "OnClientSettingsChanged". It's necessary, that "OnClientSettingsChanged" calls, when client changes concrete cvar (cl_cmdrate).
__________________

3SMedia #1 | classic gameplay | tick 100 (81.25.49.19:27015)
3SMedia #2 | pro gaming | tick 100 (81.25.49.19:27016)
3SMedia #3 | deathmatch | tick 100 (81.25.49.19:27017)
Sorry for my VERY bad english .
FroL is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 10-03-2008 , 09:20   Re: OnClientSettingsChanged
Reply With Quote #6

No, you can't do that. As this page tells you, OnClientSettingsChanged only tells you which client's settings changed, nothing else.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 10-03-2008 , 11:30   Re: OnClientSettingsChanged
Reply With Quote #7

Quote:
Originally Posted by DJ Tsunami View Post
No, you can't do that. As this page tells you, OnClientSettingsChanged only tells you which client's settings changed, nothing else.
He means "when", not "which".
bl4nk is offline
FroL
Member
Join Date: Jul 2007
Old 10-03-2008 , 18:48   Re: OnClientSettingsChanged
Reply With Quote #8

Quote:
Originally Posted by DJ Tsunami View Post
No, you can't do that. As this page tells you, OnClientSettingsChanged only tells you which client's settings changed, nothing else.
__________________

3SMedia #1 | classic gameplay | tick 100 (81.25.49.19:27015)
3SMedia #2 | pro gaming | tick 100 (81.25.49.19:27016)
3SMedia #3 | deathmatch | tick 100 (81.25.49.19:27017)
Sorry for my VERY bad english .
FroL is offline
BAILOPAN
Join Date: Jan 2004
Old 10-04-2008 , 11:56   Re: OnClientSettingsChanged
Reply With Quote #9

So, that's not entirely true. Certain cvars are marked with FCVAR_USERINFO which means they are networked right away, triggering OnClientSettingsChanged.

You should use GetClientInfo rather than QueryCvar. OnClientSettingsChanged is not called for cvars that require QueryCvar.

You still need to manually check which cvar changed, but the list is much smaller.
BAILOPAN is offline
FroL
Member
Join Date: Jul 2007
Old 10-06-2008 , 05:21   Re: OnClientSettingsChanged
Reply With Quote #10

Oh, thanks Bail..
__________________

3SMedia #1 | classic gameplay | tick 100 (81.25.49.19:27015)
3SMedia #2 | pro gaming | tick 100 (81.25.49.19:27016)
3SMedia #3 | deathmatch | tick 100 (81.25.49.19:27017)
Sorry for my VERY bad english .
FroL is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:51.


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