Trouble on Getting a Client Cvar?
Hello,
I try to write a simple plugin reading a cvar from the client but i get errors and i cannot read the value :( Whats the problem? (I also tried client_putinserver and also client_authorized but same problem..) PHP Code:
PHP Code:
Thanks.. |
Re: Trouble on Getting a Client Cvar?
You should use client_putinserver instead of client_connect, because in client_connect, the user isn't in the game yet, he is still in the middle of connecting. client_putinserver the client is ready to play.
|
Re: Trouble on Getting a Client Cvar?
I've changed it to client_putinserver error is gone but i cannot still read from log file the client cvar's value and also nothing is printed on screen(using say)
the log file includes only: PHP Code:
|
Re: Trouble on Getting a Client Cvar?
is there anybody that knows the solution or can show me the way to the solution?
|
Re: Trouble on Getting a Client Cvar?
Quote:
|
Re: Trouble on Getting a Client Cvar?
Basically your first code is good.
Try this one and tell me if it logs something : Code:
|
Re: Trouble on Getting a Client Cvar?
No :( I've tried and nothing successful.. what's the problem? :(
|
Re: Trouble on Getting a Client Cvar?
Do you test it on a listenserver, or with bots ?
Or do you test it with real players ? |
Re: Trouble on Getting a Client Cvar?
I'm trying it on my local computer and local server and connecting locally to my server also developing it on the same computer :) everything is local..
From a friend advice i try function get_user_name: PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Re: Trouble on Getting a Client Cvar?
The problem is that zoom_sensitivity_ratio is a client cvar. It cannot be retrieved with get_user_info. By get_user_info, you can retrieve any information from setinfo structure (which can be viewed by using setinfo command).
Field rate is a part of setinfo structure - that's why it's possible to get it. This issue is very simmilar to the one with fps_max cvar. Many think that it's possible to get this value with this function (as it's written in example in funcwiki) - but it's meretricious disinformation. I suggest using THIS function instead. I have no experience with it. Edit: And as I read previous posts, it was suggested already. You should read carefully what they advice you. The way you're doing it won't work. |
| All times are GMT -4. The time now is 01:22. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.