我在网上找了一个防炸的源代码,请版主帮我看看能用吗?
源码
/* UTF-8 func by www.DT-Club.net */
#include <amxmodx>
#include <amxmisc>
public plugin_init()
{
register_plugin("autobuy fix", "1.0", "201724");
register_clcmd("cl_autobuy","cmd_check");
register_clcmd("cl_rebuy","cmd_check");
register_clcmd("cl_setautobuy","cmd_check");
register_clcmd("cl_setrebuy","cmd_check");
}
public cmd_check(id)
{
new szCommand[512];
new argc = read_argc();
for(new i=1;i<argc;i++)
{
read_argv(i,szCommand,charsmax(szCommand));
if(strlen(szCommand)>31)
{
server_cmd("kick #%d ^"由于你涉嫌炸服,已被踢出游戏^"",get_user_userid(id));
return PLUGIN_HANDLE;
}
}
return PLUGIN_CONTINUE;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil\\ fcharset134 Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang2052\\ f0\\ fs16 \n\\ par }
*/
|