悟空 发表于 2004-8-8 21:56:21

哪里有AMXX 的高PING kick插件啊?

找了好久了。。。谢谢 :faint:

akEr 发表于 2004-8-8 22:02:17

100以上自动KICK:thefinger

悟空 发表于 2004-8-9 20:33:33

亲人啊。谢谢啊。。有源码吗??怎样才能改ping值? :65:

akEr 发表于 2004-8-9 21:10:21

/* AMX Mod script.
*
* (c) 2002-2003, OLO
* This file is provided as is (no warranties).
*
* Players with immunity won't be checked
*/

#include <amxmod>

new HIGHPING_MAX = 100 // set maximal acceptable ping
new HIGHPING_TIME = 12// set in seconds frequency of ping checking
new HIGHPING_TESTS = 5// minimal number of checks before doing anything

new g_Ping
new g_Samples

public plugin_init()
{
register_plugin("High Ping Kicker","0.9.4","default")

if ( HIGHPING_TIME < 5 ) HIGHPING_TIME = 5
if ( HIGHPING_TESTS < 3 ) HIGHPING_TESTS = 3
}

public client_disconnect(id)
remove_task( id )

public client_putinserver(id)
{   
g_Ping = 0
g_Samples = 0

if ( !is_user_bot(id) )
{
    new param
    param = id
    set_task( float(HIGHPING_TIME) , "checkPing" , id , param , 1 , "b" )
    set_task( 10.0 , "showWarn" , id , param , 1 )   

}
}

kickPlayer( id )
{
new name
get_user_name( id , name , 31 )
client_print(0,print_chat,"** Player %s disconnected due to high ping",name)
client_cmd(id,"echo ^"** Sorry but you have too high ping, try later...^";disconnect")
}

public checkPing(param[])
{
new id = param[ 0 ]

if ( get_user_flags(id) & ADMIN_IMMUNITY ) return // has immunity

new p, l

get_user_ping( id , p , l )

g_Ping[ id ] += p
++g_Samples[ id ]

if ( (g_Samples[ id ] > HIGHPING_TESTS) &&
    (g_Ping / g_Samples > HIGHPING_MAX))   
    kickPlayer(id)
}

public showWarn(param[])
client_print( param ,print_chat,"* Players with ping higher than %d will be kicked!", HIGHPING_MAX )

修改这里
new HIGHPING_MAX = 100 // set maximal acceptable ping

悟空 发表于 2004-8-10 21:30:32

这个插件好象现在没有汉化版啊
页: [1]
查看完整版本: 哪里有AMXX 的高PING kick插件啊?