with the following code Im tryin to unban user from admin console so that upon fail/success admin can have the proper output. But the code seems to be say bad_rcon
Code:
//global
new g_rcon[20]
//plugin_init()
get_cvar_string("rcon_password", g_rcon, 19)
//admin cmd public function
new szCommand[20]
read_argv(0, szCommand, 19)
if(equal(szCommand, "amx_unbanid"))
{
if(!cmd_access(id, level, cid, 2))
return PLUGIN_HANDLED
new szArg[25]
read_argv(1, szArg, 24)
client_cmd(id, "rcon_password ^"%s^";rcon removeid ^"%s^";rcon_password ^"%s^"", g_rcon, szArg, "")
}