|
发表于 2007-12-15 23:04:21
|
显示全部楼层
来自 中国–广东–惠州–惠城区
回复: 服务器怎么禁止改名?
[php]
#include <amxmodx>
#include <amxmisc>
#define PLUGIN_NAME "New Plug-In"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "zwfgdlc"
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
}
public client_infochanged(id)
{
new oldname[32],newname[32]
get_user_name(id,oldname,31)
get_user_info(id,"name",newname,31)
if(!equal(oldname,newname) && containi(newname,"[NO-sXe-I]")==-1 && get_user_team(id)!=-1)
{
server_cmd("kick #%d ^"%s^"",get_user_userid(id),"由于你更改名字,已被服务器踢出")
}
}
public client_authorized(id)
{
new name[32]
get_user_name(id,name,31)
if(containi(name,"www.")!=-1 || containi(name,".com")!=-1)
{
server_cmd("kick #%d ^"%s^"",get_user_userid(id),"本服务器禁止使用这类ID")
}
}
[/php] |
|