cs1.6 2个插件怎么用
4个回答
2013-09-21
展开全部
找个high_ping_kicker.amxx插件
不能通用。
你把下面的源代码用记事本复制到high_ping_kicker.sma
然后编译成high_ping_kicker.amxx
编译方法可以见http://hi.baidu.com/karab/blog/item/e9d3bf193bb4f04543a9ad9c.html
这个是从AMXX1.76C汉化版里拿出来的
/* AMX Mod X
*
* (c) Copyright 2004, datang
*
* This file is part of AMX Mod X.
*
*/
#include <amxmodx>
new g_Ping[33]
new g_Samples[33]
new pamx_hpk_ping
new pamx_hpk_check
new pamx_hpk_tests
new pamx_hpk_delay
public plugin_init()
{
register_plugin("High Ping Kicker","1.0","datang")
register_dictionary("high_ping_kicker.txt")
pamx_hpk_ping = register_cvar("amx_hpk_ping","200")
pamx_hpk_check = register_cvar("amx_hpk_check","5")
pamx_hpk_tests = register_cvar("amx_hpk_tests","5")
pamx_hpk_delay = register_cvar("amx_hpk_delay","60")
if ( get_pcvar_num( pamx_hpk_check ) < 5 ) set_pcvar_num( pamx_hpk_check , 5 )
if ( get_pcvar_num( pamx_hpk_tests ) < 3 ) set_pcvar_num( pamx_hpk_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( 10.0 , "showWarn" , id , param , 1 )
if (get_pcvar_num(pamx_hpk_delay) != 0) {
set_task( float(get_pcvar_num(pamx_hpk_delay)), "taskSetting", id, param , 1)
}
else {
set_task( float(get_pcvar_num( pamx_hpk_check )) , "checkPing" , id , param , 1 , "b" )
}
}
}
public showWarn(param[]) {
client_print( param[0] ,print_chat,"* %L",LANG_SERVER,"PING", get_pcvar_num( pamx_hpk_ping ) )
console_print( param[0],"* %L",LANG_SERVER,"PING", get_pcvar_num( pamx_hpk_ping ) )
}
public taskSetting(param[]) {
set_task( float(get_pcvar_num( pamx_hpk_check )) , "checkPing" , param[0] , param , 1 , "b" )
}
kickPlayer( id )
{
new name[32],authid[32]
new userid = get_user_userid(id)
get_user_name(id,name,31)
get_user_authid(id,authid,31)
client_print(0,print_chat,"* %L", id, "KICKED", name)
log_amx("^"%s<%d><%s><>^" has been kicked due to high ping.", name, userid, authid)
client_cmd(id, "echo ^"* %L^"", id, "HPK")
client_cmd(id, "disconnect") //Has no effects in CS1.5
server_cmd("kick #%d", userid) //So kicked
remove_task(id)
}
public checkPing(param[])
{
new id = param[ 0 ]
if ( get_user_flags(id) & ADMIN_IMMUNITY || get_user_flags(id) & ADMIN_RESERVATION ) return
new p, l
get_user_ping( id , p , l )
g_Ping[ id ] += p
++g_Samples[ id ]
if ( (g_Samples[ id ] >= get_pcvar_num( pamx_hpk_tests )) && (g_Ping[id] / g_Samples[id] > get_pcvar_num( pamx_hpk_ping )) )
kickPlayer(id)
}
不能通用。
你把下面的源代码用记事本复制到high_ping_kicker.sma
然后编译成high_ping_kicker.amxx
编译方法可以见http://hi.baidu.com/karab/blog/item/e9d3bf193bb4f04543a9ad9c.html
这个是从AMXX1.76C汉化版里拿出来的
/* AMX Mod X
*
* (c) Copyright 2004, datang
*
* This file is part of AMX Mod X.
*
*/
#include <amxmodx>
new g_Ping[33]
new g_Samples[33]
new pamx_hpk_ping
new pamx_hpk_check
new pamx_hpk_tests
new pamx_hpk_delay
public plugin_init()
{
register_plugin("High Ping Kicker","1.0","datang")
register_dictionary("high_ping_kicker.txt")
pamx_hpk_ping = register_cvar("amx_hpk_ping","200")
pamx_hpk_check = register_cvar("amx_hpk_check","5")
pamx_hpk_tests = register_cvar("amx_hpk_tests","5")
pamx_hpk_delay = register_cvar("amx_hpk_delay","60")
if ( get_pcvar_num( pamx_hpk_check ) < 5 ) set_pcvar_num( pamx_hpk_check , 5 )
if ( get_pcvar_num( pamx_hpk_tests ) < 3 ) set_pcvar_num( pamx_hpk_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( 10.0 , "showWarn" , id , param , 1 )
if (get_pcvar_num(pamx_hpk_delay) != 0) {
set_task( float(get_pcvar_num(pamx_hpk_delay)), "taskSetting", id, param , 1)
}
else {
set_task( float(get_pcvar_num( pamx_hpk_check )) , "checkPing" , id , param , 1 , "b" )
}
}
}
public showWarn(param[]) {
client_print( param[0] ,print_chat,"* %L",LANG_SERVER,"PING", get_pcvar_num( pamx_hpk_ping ) )
console_print( param[0],"* %L",LANG_SERVER,"PING", get_pcvar_num( pamx_hpk_ping ) )
}
public taskSetting(param[]) {
set_task( float(get_pcvar_num( pamx_hpk_check )) , "checkPing" , param[0] , param , 1 , "b" )
}
kickPlayer( id )
{
new name[32],authid[32]
new userid = get_user_userid(id)
get_user_name(id,name,31)
get_user_authid(id,authid,31)
client_print(0,print_chat,"* %L", id, "KICKED", name)
log_amx("^"%s<%d><%s><>^" has been kicked due to high ping.", name, userid, authid)
client_cmd(id, "echo ^"* %L^"", id, "HPK")
client_cmd(id, "disconnect") //Has no effects in CS1.5
server_cmd("kick #%d", userid) //So kicked
remove_task(id)
}
public checkPing(param[])
{
new id = param[ 0 ]
if ( get_user_flags(id) & ADMIN_IMMUNITY || get_user_flags(id) & ADMIN_RESERVATION ) return
new p, l
get_user_ping( id , p , l )
g_Ping[ id ] += p
++g_Samples[ id ]
if ( (g_Samples[ id ] >= get_pcvar_num( pamx_hpk_tests )) && (g_Ping[id] / g_Samples[id] > get_pcvar_num( pamx_hpk_ping )) )
kickPlayer(id)
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
名片
2024-10-28 广告
2024-10-28 广告
正版Hyperworks软件多少钱,购买正版Hyperworks软件,免费咨询Altair Hyperworks软件中国区网站首页,HyperWorks软件提供了完整的CAE有限元分析解决方案,免费试用和咨询官网。...
点击进入详情页
本回答由名片提供
2013-09-21
展开全部
这个插件我也有,其实你把这两个插件的cstris文件夹放在一起就OK了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-09-21
展开全部
把插件解压到CS的根目录下CSTRIS。。。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-09-21
展开全部
把文件压缩到CS的cstris文件下就行了!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询