How can I get a cvar value from a client?
The idea is simple. I need to get a integer, in this case, value of a client's cvar.
I'm trying to make a plugin that would set client's rate and cl_updaterate to fit my private server's limited bandwidth without the hassle of telling them to do it manually. Code:
#include <amxmodx> |
Re: How can I get a cvar value from a client?
This is slowhacking. Leave clients cvars for themselves to change.
|
Re: How can I get a cvar value from a client?
Also, the statement "Your rates have been changed for the best performance!" is not true for everybody that connect to your server. You are likely making it worse for some people.
Also, the server has a way to to set player's rate, no plugin necessary!!! Simply set the follow cvars for your server and it will force them to use the rates you specify: sv_minrate sv_maxrate sv_minudaterate sv_maxupdaterate Set the minimum and maximum for the range of values that you feel are acceptable. But remember, if you force people to use too high or too low of rates, you could actually make their performance worse. |
Re: How can I get a cvar value from a client?
it's beyond me how much people can avoid answering a goddamn question
PHP Code:
|
Re: How can I get a cvar value from a client?
Quote:
The X/Y problem is also a real thing (no matter how hard you try to pretend it isn't), and often there is very good reason to go a longer way of discussion instead of fulfilling every request wihtout second thought, no matter how silly it sounds. This is how you can really help people do the right thing and learn, instead of programming by clobbering together dozens of random code snippets and wasting countless hours going in the wrong directions. Experience is how you can actually help people. In programming "why?" is most often the more important question than "how?". Telling someone how to use query_client_cvar is, these days, a matter of simply linking to the API documentation page. |
Re: How can I get a cvar value from a client?
Well Idk why it's so hatred this slowhacking, nobody bothers to explain why it's hated and why I should avoid using it with a clear example. My only intention was to set their rates up according to the server, as the most common reason for loss (sometimes choke too) are cvars not set the best. Which alternative function should I use then?. What can happen when I use console_cmd or client_cmd ?
Also for making it worse for some people, it can be for people who have slower internet, but the only thing that matters most is updaterate. Clients have mostly 30 or 60 maybe even higher, they request too much updates and get choke then blame the server "Hurr i only get ping here wtf". My updaterate set on the server is 24 as I have a low bandwidth for a server i'm planning to use privately and not all the time anyway. |
Re: How can I get a cvar value from a client?
Slowhacking or not, 24 is a terrible update rate, and suggests you shouldn't be running a server on that connection in the first place.
The issue with slowhacking is that, given your server connection, you will "optimize" the client to your server which then in turn makes their experience on literally every other server shit aswell. So they have a sub-par experience on your server because it can't do better, and they will have a sub-par experience on every other server because you fucked with their settings. This doesn't just apply to rates, but also to binds and other random variables. Use the commands fysiks suggested, and stay away from people's configs. They will hate your server more for slowhacking than for a nonoptimal experience on an already bad connection. |
Re: How can I get a cvar value from a client?
Also, since it hasn't been mentioned, it's impossible to send commands to a client after they leave.
But, as Nextra (and myself said) the server already had this functionality built into the game. Simply use the server settings I posted above and there will be no need to use any client commands and there is nothing to "set back" for the player. |
Re: How can I get a cvar value from a client?
Quote:
|
Re: How can I get a cvar value from a client?
Quote:
|
All times are GMT -4. The time now is 00:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.