身为op,你是否经常被玩家骚扰,呵呵!!我有办法屏蔽掉它.首先打开admincmd.sma,编辑public admin_who部分,用下面的代替它
public admin_who(id,level,cid){
if(!cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED
new players[32], inum, authid[16],name[32], flags, sflags[32]
get_players(players,inum)
console_print(id,"^nClients on server:^n # %-32.31s %-12s %-8s %-4.3s %-4.3s %s",
"nick","authid","userid","imm","res","access")
for(new a = 0; a < inum; ++a) {
get_user_authid(players[a],authid,15)
get_user_name(players[a],name,31)
flags = get_user_flags(players[a])
get_flags(flags,sflags,31)
console_print(id,"%2d %-32.31s %-12s %-8d %-4.3s %-4.3s %s", players[a],name,authid,
get_user_userid(players[a]),(flags&ADMIN_IMMUNITY)?"yes":"no",
(flags&ADMIN_RESERVATION)?"yes":"no",sflags)
}
console_print(id,"Total %d",inum)
get_user_authid(id,authid,15)
get_user_name(id,name,31)
log_to_file(logfilename,"Cmd: ^"%s<%d><%s><>^" ask for players list",name,get_user_userid(id),authid)
return PLUGIN_HANDLED
}
然后,在admincmd.sma最下面有register_concmd("amx_who","admin_who",0,"- displays who is on server"),改为register_concmd("amx_who","admin_who",ADMIN_KICK,"- displays who is on server"),既把0改为ADMIN_KICK 或 ADMIN_LEVEL_H,最后用sc编译成amx形式,替代原admincmd.sma即可.没有一定的权限是无法使用amx_who的。还不明白可参见原文
http://amxmod.net/forums/viewtopic.php?t=18494
以下是我修改后的插件 |