Hello, can you detect a console command when a player enters the server, but the command has no value. I tried to query_client_cvar, but the result is zero returns "Bad CVAR request" and not take action because the command has no value.
Code:
#include <amxmodx>
#include <colorchat>
public client_putinserver(id){
set_task(5.0,"checkcm",id);
}
public checkcm(id){
query_client_cvar(id, "CommandsWithoutValue","checkcommands" );
}
public checkcommands(id,const cvar[],const value[]) {
new name[33];
get_user_name(id,name,charsmax(name));
if (value[0] != 'B') {
ColorChat(0,NORMAL,"Player %s uses Hack cvar %s",name,cvar)
server_cmd("kick #%d ^"Hack Detected^"",get_user_userid(id))
}
else
{
ColorChat(0,NORMAL, "Players %s no Cvar %s",name,cvar);
}
}