|
发表于 2009-2-3 13:36:09
|
显示全部楼层
来自 中国–广西–百色
本帖最后由 心静如水 于 2009-2-3 13:37 编辑
1# 8874323
进服人多时会蒙混过关的,在他死亡时或新开局检测才比较正确
register_plugin("namelen", "1.0", "A.MI")
get_configsdir(g_motdFile, 63)
format(g_motdFile, 63, "%s/noname.ini", g_motdFile)
register_logevent("newRound", 2, "0=World triggered", "1=Round_Start")
return PLUGIN_CONTINUE
}
public newRound(){
set_task(13.0,"chick_name")
}
public chick_name(){
new players[32],num
get_players(players, num)
for (new i = 0; i < num; i++){
new name[32]
get_user_name(players, name, 31)
get_user_info(players, "name", name, 31)
if( file_exists(g_motdFile) ){
new message[192], len, line = 0
while(read_file(g_motdFile, line++, message, 191, len)){
if( containi(name, message) != -1 ){
server_cmd( "kick #%d ^"你的名字不受欢迎,含有%s^"", get_user_userid(players), message)
}
}
}
if( strlen(name)>29 ){
server_cmd("kick #%d ^"你的名字超过 28 位了^"", get_user_userid(players))
}
}
return PLUGIN_HANDLED
}
用它修改一下即可 |
|