内网优先插件老踢内网!有截图
这两天服务器老踢人,开始以为是服务器自动踢的,后来发现每次踢都是1个1个踢。仔细看控制台发现是内网优先插件挤出去的。前两个月还是很正常,现在只要有内网的挤其他人PING高一点就挤谁。哎………………回复: 内网优先插件老踢内网!有截图
那个插件里面说明了的,服满了如果有内网的进就踢ping高的回复: 内网优先插件老踢内网!有截图
不是吧,这样的话就没话说了 :confused:回复: 内网优先插件老踢内网!有截图
内网优先这插件`有2功能`论坛有说过``可以吧PING高的KICK
或是不KICK
回复: 内网优先插件老踢内网!有截图
Post by AE86不是吧,这样的话就没话说了 :confused:
先看你的admin插件冲突那句改掉了没有,不然内部玩家没有得到B权限!
照源码看只会踢外网Ping高的,OP和内部B玩家都不会被踢出,
我这全是内时就会进满,不会再有预留通道出现,也没法再进入,OK!
回复: 内网优先插件老踢内网!有截图
是啊,我这全是内网时也是满的。但很多时候都有5-6个一起挤,不停的挤,过一会就会有个内网的挤出来了,就如1楼的图提示了。关于yanexp 说的admin冲突我就有点不明白了,因为我用的admin是你提供下载的。附上源码
#include <amxmod>
public client_connect(id){
new userip
new ips
new name
new g_amx_netbarip
get_user_ip(id,userip,16,1)
copy(ips,7,userip)
get_cvar_string("amx_netbarip",g_amx_netbarip,7)
get_user_name(id,name,32)
if (equali(ips,g_amx_netbarip)){
set_user_flags(id,read_flags("b"))
client_print(0,print_chat,"*内网玩家: %s (%s)",name,userip)
new maxplayers = get_maxplayers()
new players = get_playersnum( 1 )
new limit = maxplayers - 1
if( players > limit ){
kickhping()
}
}else{
client_print(0,print_chat,"*外网玩家: %s (%s)",name,userip)
}
//client_print(0,print_chat,"*test: %s |%s",ips,g_amx_netbarip)
return PLUGIN_CONTINUE
}
kickhping() {
new who = 0, ping, loss, worst = -1
new maxplayers = get_maxplayers()
for(new i = 1; i <= maxplayers; ++i) {
if ( !is_user_connected(i) && !is_user_connecting(i) )
continue // not used slot
if (get_user_flags(i)&ADMIN_RESERVATION)
continue // has reservation, skip him
get_user_ping(i,ping,loss) // get ping
if ( ping > worst ) {
worst = ping
who = i
}
}
if(who)
if ( is_user_bot(who) )
server_cmd("kick #%d", get_user_userid(who))
else{
client_cmd(who,"echo ^"Dropped due to high ping to free slot for an admin^";disconnect")
client_print(0,print_chat,"*OP通道已踢出外网Ping高玩家!!!")
}
return who
}
public plugin_init() {
register_plugin("NetBar","0.2","YanOnline")
register_cvar("amx_netbarip","192.168")
return PLUGIN_CONTINUE
}
页:
[1]