AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   What method is more efficient to get the value of rate? (https://forums.alliedmods.net/showthread.php?t=221248)

vamppa 07-19-2013 16:06

What method is more efficient to get the value of rate?
 
Is it more efficient to get the value of rate with query_client_cvar( id) or by get_user_info(id, "rate" ?

YamiKaitou 07-19-2013 16:16

Re: What method is more efficient to get the value of rate?
 
rate is a client cvar, not an info string. So, only query_client_cvar will work

ConnorMcLeod 07-19-2013 16:39

Re: What method is more efficient to get the value of rate?
 
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


vamppa 07-19-2013 16:58

Re: What method is more efficient to get the value of rate?
 
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?

ConnorMcLeod 07-19-2013 17:18

Re: What method is more efficient to get the value of rate?
 
infochanged should be called on rate changes, but you should check it ;)

You ask questions, but you would have better to check by yourself ;)

vamppa 07-19-2013 17:32

Re: What method is more efficient to get the value of rate?
 
ai, true it is because Ive tested before but would like to get input.
ta, think I know what to do now.

fysiks 07-20-2013 03:41

Re: What method is more efficient to get the value of rate?
 
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).

vamppa 07-20-2013 12:37

Re: What method is more efficient to get the value of rate?
 
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?

ConnorMcLeod 07-20-2013 13:31

Re: What method is more efficient to get the value of rate?
 
It's working.

fysiks 07-20-2013 18:59

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

Originally Posted by vamppa (Post 1995113)
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.


All times are GMT -4. The time now is 06:27.

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