|
楼主 |
发表于 2005-11-22 17:38:42
|
显示全部楼层
来自 日本
【求助】请简单修改一个插件。急急急 !在线等待中。。。
kickLag() {
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")
return who
}
在线等待中。。。
请在这个代码里面加一个如果Ping<200者不踢的条件语句。
感谢 !
这一段代码为slots_reservation.sma 里的一部分。slots_reservation.sma 附件在这里
http://forum.dt-club.net/showthread.php?t=25190 |
|