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>
#include <amxmisc>
#define PLUGIN "Players' Rate CVars"
#define VERSION "1.0"
#define AUTHOR "Vet(3TT3V)"
new g_info[256]
new g_pos
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_concmd("amx_rate_info", "cmd_get_rates", ADMIN_CFG, "Get players' rate CVars")
}
public cmd_get_rates(id)
{
static iPlayers[32]
new pid, iNum, i, info[32]
get_players(iPlayers, iNum, "ch")
for (i = 0; i < iNum; i++) {
pid = iPlayers[i]
get_user_name(pid, info, 31)
g_pos = format(g_info, 255, "%s ",info)
query_client_cvar(pid, "rate", "query_results")
query_client_cvar(pid, "cl_updaterate", "query_results")
query_client_cvar(pid, "cl_cmdrate", "out_results")
}
return PLUGIN_HANDLED
}
public query_results(id, cvar_name[], cvar_value[])
{
g_pos += format(g_info[g_pos], 255, "%s=%s ", cvar_name, cvar_value)
}
public out_results(id, cvar_name[], cvar_value[])
{
g_pos += format(g_info[g_pos], 255, "%s=%s ", cvar_name, cvar_value)
console_print(id, "Exit info %s", g_info)
}
Thanks!
__________________