Basically your first code is good.
Try this one and tell me if it logs something :
Code:
#include <amxmodx>
#define PLUGIN "TestingCvarPlugin"
#define VERSION "1.0"
#define AUTHOR "test"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
// Add your code here...
}
public client_putinserver(id)
{
client_cmd(id, "say %s", "testing cvar reading from client")
query_client_cvar(id, "zoom_sensitivity_ratio", "cvar_result")
query_client_cvar(id, "cl_cmdrate", "cvar_result")
}
public cvar_result(id, const cvar[], const value[])
{
new name[32]
get_user_name(id, name, 31)
if(equal(value, "Bad CVAR request"))
log_amx("Client %d(%s) has blocked his cvar %s", id, name, cvar)
else
log_amx("Client %d(%s)'s %s is %s", id, name, cvar, value)
}