Code:
#include <amxmodx>
public plugin_init()
{
register_plugin("query client cvar example" , "1.0" , "LearninG")
register_clcmd("say /test" , "test")
}
public test(id)
{
query_client_cvar(id , "cl_righthand" , "Handler")
}
public Handler(id , const szCvar[] , const szValue[])
{
new value = str_to_num(szValue)
client_print(id , print_chat , "[AMXX] cl_righthand is %d" , value)
}
if you want to check the value :
Code:
if(value == 1)
{
//do your code
}
else
{
//do your code
}