Raised This Month: $ Target: $400
 0% 

What method is more efficient to get the value of rate?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vamppa
Senior Member
Join Date: Apr 2010
Location: The Netherlands
Old 07-19-2013 , 16:06   What method is more efficient to get the value of rate?
Reply With Quote #1

Is it more efficient to get the value of rate with query_client_cvar( id) or by get_user_info(id, "rate" ?
vamppa is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-19-2013 , 16:16   Re: What method is more efficient to get the value of rate?
Reply With Quote #2

rate is a client cvar, not an info string. So, only query_client_cvar will work
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-19-2013 , 16:39   Re: What method is more efficient to get the value of rate?
Reply With Quote #3

rate is also in setinfo string, so get_user_info seems better as it has no delay.

Code:
] setinfo
_cl_autowepswitch   0
bottomcolor         6
cl_dlmax            512
cl_lc               1
cl_lw               1
model               gordon
topcolor            30
_ah                 1
_vgui_menus         0
cl_updaterate       90
name                ConnorMcLeod
rate                30000
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
vamppa
Senior Member
Join Date: Apr 2010
Location: The Netherlands
Old 07-19-2013 , 16:58   Re: What method is more efficient to get the value of rate?
Reply With Quote #4

sweet thanks.
to follow up on trying to find the most resource/efficient way.
what would in turn be more efficient.

getting the value on public client_infochanged(id) or with an repeated set_task?
ps. is public client_infochanged(id) fired twice or only once everytime something gets changed?

Last edited by vamppa; 07-19-2013 at 16:59.
vamppa is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-19-2013 , 17:18   Re: What method is more efficient to get the value of rate?
Reply With Quote #5

infochanged should be called on rate changes, but you should check it ;)

You ask questions, but you would have better to check by yourself ;)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
vamppa
Senior Member
Join Date: Apr 2010
Location: The Netherlands
Old 07-19-2013 , 17:32   Re: What method is more efficient to get the value of rate?
Reply With Quote #6

ai, true it is because Ive tested before but would like to get input.
ta, think I know what to do now.
vamppa is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-20-2013 , 03:41   Re: What method is more efficient to get the value of rate?
Reply With Quote #7

You can know everybody's "rate" if you set sv_minrate and sv_maxrate (if they are not equal then you know their rate will be in between the two values).
__________________
fysiks is offline
vamppa
Senior Member
Join Date: Apr 2010
Location: The Netherlands
Old 07-20-2013 , 12:37   Re: What method is more efficient to get the value of rate?
Reply With Quote #8

yeah ive wondered about that actually working or not.
I set them along the side but never saw it changing my client rate setting.

is it for the server to have an rate allowed to range betweenn the two values?
vamppa is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-20-2013 , 13:31   Re: What method is more efficient to get the value of rate?
Reply With Quote #9

It's working.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-20-2013 , 18:59   Re: What method is more efficient to get the value of rate?
Reply With Quote #10

Quote:
Originally Posted by vamppa View Post
yeah ive wondered about that actually working or not.
I set them along the side but never saw it changing my client rate setting.

is it for the server to have an rate allowed to range betweenn the two values?
It will never change your config files, it just makes the game use the specified rates. This allows you to have your own setting for the rate for servers that allow that rate.
__________________
fysiks 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 06:27.


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