搜索
查看: 18425|回复: 107

sv_lan控制,还是自力更生吧。暂时解决auth server reject的问题了。

[复制链接]
发表于 2004-8-8 08:00:44 | 显示全部楼层 |阅读模式 来自 中国–北京–北京–海淀区
nwb大侠的代码不好用,等不及了,只有自力更生了,10多年没programming了。。。phew。。。 :10:

#include <amxmod>

new Float:sub_Cycle_timer = 30.0
new Float:Cycle_timer = 300.0

public plugin_init()
{
        register_plugin("fk_auth_server","0.2beta","magicmark")
        register_cvar("sv_lan_enable","1")
        set_cvar_num("sv_lan",1)
        set_task(Cycle_timer,"sv_lan_cycle",80000,"",0,"b",3)
}

public sv_lan_cycle()
{
        if (get_cvar_num("sv_lan_enable")) {
                set_cvar_num("sv_lan",1)
                set_task(sub_Cycle_timer,"set_sv_lan_0",80001)
        }else
                return PLUGIN_HANDLED
}

public set_sv_lan_0()
{
        set_cvar_num("sv_lan",0)
}

昨天晚上,我的服务器居然一直是满的。。。 :thefinger
附的是amxx的

ps: this plugin was inspired by nwb13.

大家可以试试什么样的参数最好,晚上起来看看是不是加上人数判断。比如人数超过maxplayers的80%,就暂停sv_lan 0。。。

改正一行:new Float:sub_Cycle_timer = 270.0

附件是错误的code编译的,请大家改正自己编译吧。

本帖子中包含更多资源

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

×
匿名  发表于 2004-8-8 08:47:29 来自 Invalid
lihai
发表于 2004-8-8 09:28:06 | 显示全部楼层 来自 中国–广东–佛山–禅城区
参数不用加sv_lan 1吧!

试了一下,参数里没有+sv_lan 1,在内网可以正常进去,只是在internet里看不到服务器!
还差点什么吗?
回复

使用道具 举报

发表于 2004-8-8 10:39:40 | 显示全部楼层 来自 中国–福建–龙岩
改这些都不是关键。
改swds.dll的机制才是长效的。 :thefinger
回复

使用道具 举报

发表于 2004-8-8 12:05:38 | 显示全部楼层 来自 中国–浙江–宁波–余姚市
不错 暂时只能这样了 哈哈
回复

使用道具 举报

发表于 2004-8-8 12:10:28 | 显示全部楼层 来自 中国–台湾–台北市
amx or amxx?

If this is for amx...could u pleaz compile the amxx version?

thanks
回复

使用道具 举报

发表于 2004-8-8 12:38:45 | 显示全部楼层 来自 中国–山东–济南
我试了怎么不行呀,怎么证明这个amxx插件已经运行?
回复

使用道具 举报

发表于 2004-8-8 12:42:39 | 显示全部楼层 来自 中国–云南–大理白族自治州–大理市
太好了啊!!!
是啊,快捷方法里用不用加参数sv_lan 1呢?
回复

使用道具 举报

发表于 2004-8-8 12:45:24 | 显示全部楼层 来自 中国–浙江–宁波–余姚市
测试未能通过 希望加上client_print提示0 or 1
回复

使用道具 举报

发表于 2004-8-8 13:14:45 | 显示全部楼层 来自 中国–河北–秦皇岛
sv_lan 0后不能转换sv_lan 1
回复

使用道具 举报

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

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