pizinet 发表于 2003-11-29 15:48:32

关于amx_showip插件的编译

安装showip插件后,服务器会在有玩家连入时在屏幕回显该玩家ip

现在我只能注释掉了这段代码,还没测试是否还会回显

请问如何修改此段代码,让具有一定权限的OP才能看到回显?

public client_connect(id){
new userip
new name
new IPD
get_user_ip(id,userip,16,1)
get_user_name(id,name,32)
findip(userip, IPD)
//server_cmd("say %s (%s , %s) trying to connect",name,userip,IPD)
client_print(0,print_chat," %s (%s,%s) trying to connect",name,userip,IPD);
return PLUGIN_CONTINUE
}

飘风 发表于 2003-11-29 16:02:58

若改为是具有ADMIN_CHAT权限的op能看到可改为
public client_connect(id){
new userip
new name
new IPD
new players, inum
get_user_ip(id,userip,16,1)
get_user_name(id,name,32)
findip(userip, IPD)
//server_cmd("say %s (%s , %s) trying to connect",name,userip,IPD)
get_players(players,inum)   
for(new i=0; i<inum; ++i){
   if (players != id && get_user_flags(players) & ADMIN_CHAT)
   client_print(players,print_chat," %s (%s,%s) trying to connect",name,userip,IPD);
}
return PLUGIN_CONTINUE
}

PS:编译时请注意格式~

pizinet 发表于 2003-11-29 16:06:29

thx
马上试试
页: [1]
查看完整版本: 关于amx_showip插件的编译