搜索
查看: 1762|回复: 4

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

[复制链接]
发表于 2004-8-8 21:56:21 | 显示全部楼层 |阅读模式 来自 中国–黑龙江–哈尔滨
找了好久了。。。谢谢 :faint:
发表于 2004-8-8 22:02:17 | 显示全部楼层 来自 中国–浙江–宁波–余姚市
100以上自动KICK  :thefinger

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
回复

使用道具 举报

 楼主| 发表于 2004-8-9 20:33:33 | 显示全部楼层 来自 中国–黑龙江–哈尔滨
亲人啊。谢谢啊。。  有源码吗??  怎样才能改ping值? :65:
回复

使用道具 举报

发表于 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[33]
new g_Samples[33]

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[id] = 0
  g_Samples[id] = 0

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

  }
}

kickPlayer( id )
{
  new name[32]
  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[id] / g_Samples[id] > HIGHPING_MAX)  )   
    kickPlayer(id)
}

public showWarn(param[])
  client_print( param[0] ,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 | 显示全部楼层 来自 中国–黑龙江–哈尔滨
这个插件好象现在没有汉化版啊
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表