|
发表于 2005-8-28 13:12:10
|
显示全部楼层
|阅读模式
来自 中国–重庆–重庆–南岸区
最新虐待作弊者的想法越来越丰富,所以想到一个超级恶毒的方法,利用client_exec插件在客户端执行破坏性命令!
不过试了一下,client_exec插件的命令并不支持带空格的名字,所以我想到用USERID,我输入RCON USERS命令后,前面的数字应该是USERID了,我用命令"amx_xclient #userid 命令"可没有作用,所以我怀疑是client_exec插件不支持USERID或代码错误!
- /*
- *
- * COMMANDS:
- * - amx_xclient //run console command on client
- *
- * *For name for example if the name is DynAstY you can type in console "amx_xclient Dy" and it will do the trick as long as there are not two names starting with Dy.
- *
- */
- #include <amxmodx>
- #include <amxmisc>
- public plugin_init() {
- register_plugin("ExecClient", "0.3", "DynAstY")
- register_concmd("amx_xclient", "run_xclient", ADMIN_KICK, "<authid, nick or #userid>")
- return PLUGIN_CONTINUE
- }
- public run_xclient(id, level, cid) {
- if (!cmd_access(id, level, cid, 1)) return PLUGIN_HANDLED
- new name[32]
- new cmd[128]
- read_argv(1, name, 32)
- read_args(cmd, 128)
-
- new i=0;
- while(cmd[i]==' ') i++
- i+=strlen(name)
- while(cmd[i]==' ') i++
- if (cmd[i]=='"') i++;
- if (cmd[strlen(cmd)-1]=='"') cmd[strlen(cmd)-1]=' ';
- if (equal(name,"*")) {
- client_cmd(0,"%s",cmd[i])
- client_print(id,print_console,"Executed command on all: %s", cmd[i])
- return PLUGIN_HANDLED
- }
- new player=find_player("b",name)
- if (player) {
- new playername[32]
- get_user_name(player,playername,31);
- client_cmd(player, "%s", cmd[i]);
- client_print(id,print_console,"Executing command on %s: %s", playername, cmd[i])
- return PLUGIN_HANDLED
- }
- return PLUGIN_HANDLED
- }
复制代码 |
|