Printing query_client_cvar values
This one has me bugged. In this test code...
Code:
#include <amxmodx>Code:
I bet its something ridiculously simple. But I'll be damned if I can find it. Any ideas??? |
Re: Printing query_client_cvar values
It looks like you're trying to store the data for every player in one array, so I fixed your code for you:
Code:
Now, about the console_print(id, "Exit info %s", g_info[pid]) executing before query_results(). When you query for a client cvar, you are telling the server to call query_results when it receives information about the cvar you tell it to query. This process is not instant, so the "Exit info" prints first and later on, when information about the client's cvar is received, query_results is executed and prints the "%s=%s". |
Re: Printing query_client_cvar values
Ah, sweet. Good answer. Thanks !
And yes, I am storing all players in the same array. But it gets reset on the next player's info. My ultimate goal is to enter a command and see all player's rates etc. in the console in a list like... Code:
Thanks again. |
Re: Printing query_client_cvar values
Quote:
In this case you could actually record the time it takes to get the client's cvar value if you really wanted, but I don't think that's actually valuable information. If you'd like to know when the variable contains all the info, or when all of the clients' cvars have been recorded, you can just add another global variable to count how many times query_results() has been executed for each client. Then check if every client has had it executed 3 times (3 different cvars). |
Re: Printing query_client_cvar values
Got it figured out. After you 'schooled' me on the workings of query_client_cvar(), I figured all that I had to do was make the last cvar query produce the desired output. So I pointed the last query to a separate routine and it seems to work.
Code:
#include <amxmodx> |
| All times are GMT -4. The time now is 21:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.