|
最近我去向几个外国人搞了1段原代码 是防止客户端在游戏里面 输入 CMD dlfile maps/de_dust.bsp 等命令来下载攻击服务器的
我测试了一下 运行的不是很好 请给位帮忙修改完善一下
=============================================
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Check CMD dlfile"
#define VERSION "0.1"
#define AUTHOR "MaTTe/Styles/SixTwin"
#define KICK_REASON "Rule Violation"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_concmd("cmd","handle_cmd");
}
public handle_cmd(id)
{
new args[33];
read_argv(1,args,32);
if(containi(args,"dlfile") != -1)
{
server_cmd("kick #%i ^"%s^"",get_user_userid(id), KICK_REASON);
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}
======================================================= |
|