diff --git a/plugins/admincmd.sma b/plugins/admincmd.sma index 99e95014..340a487e 100755 --- a/plugins/admincmd.sma +++ b/plugins/admincmd.sma @@ -67,6 +67,7 @@ public plugin_init() register_concmd("amx_cfg", "cmdCfg", ADMIN_CFG, "") register_concmd("amx_nick", "cmdNick", ADMIN_SLAY, " ") register_clcmd("amx_rcon", "cmdRcon", ADMIN_RCON, "") + register_clcmd("amx_showrcon", "cmdShowRcon", ADMIN_RCON, "") register_clcmd("pauseAck", "cmdLBack") } @@ -719,6 +720,29 @@ public cmdPause(id, level, cid) return PLUGIN_HANDLED } +public cmdShowRcon(id, level, cid) +{ + if (!cmd_access(id, level, cid, 2)) + return PLUGIN_HANDLED + + new password[64] + + get_cvar_string("rcon_password", password, 63) + + if (!password[0]) + { + cmdRcon(id, level, cid) + } else { + new args[128] + + read_args(args, 127) + client_cmd(id, "rcon_password %s", password) + client_cmd(id, "rcon %s", args) + } + + return PLUGIN_HANDLED +} + public cmdRcon(id, level, cid) { if (!cmd_access(id, level, cid, 2))