|
#include <amxmodx>
#define PLUGIN "Fast DL fix"
#define VERSION "0.2"
#define AUTHOR "mazdan"
new ip[32]
new g_time
new g_setinfo
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("fixfastdl_ip","127.0.0.1:27015")
register_cvar("fixfastdl_time","3")
register_cvar("fixfastdl_si","1")
}
public plugin_cfg()
{
g_time=get_cvar_num("fixfastdl_time")
g_setinfo=get_cvar_num("fixfastdl_si")
if(!g_time)
g_time=3
get_cvar_string("fixfastdl_time",ip,31)
}
public client_connect(id)
{
if(!is_user_hltv(id) && !is_user_bot(id))
{
static last_time[33]
static userip[33]
static userinfo[2]
get_user_ip(id,userip,32)
get_user_info(id,"rd",userinfo,1)
if((get_systime()-last_time[id])>g_time && (!userinfo[1] || !g_setinfo))
{
if(g_setinfo) client_cmd(id,"setinfo rd 1")
set_task(0.1,"cl_reconnect",id)
// log_amx("REDIR %d %s => %d %d diff = %d",id,userip,last_time[id],get_systime(),last_time[id]-get_systime())
}
else
{
// log_amx("OK %d %s => %d %d diff = %d",id,userip,last_time[id],get_systime(),last_time[id]-get_systime())
if(g_setinfo) client_cmd(id,"setinfo rd ^"^"") //МЮ БЯЪЙХИ ЯКСВЮИ
}
last_time[id]=get_systime()
}
}
public cl_reconnect(id)
client_cmd(id,"Connect %s %d", ip,random_num(1,9999))
/*
* яЙЮВЮМН Я GM-Serv.Ru
* цНРНБШЕ ЯЕПБЕПЮ, ОКЮЦХМШ, ЛНДШ, ЛНДСКХ, ЙЮПРШ, ОЮРВХ...
* рЮЙФЕ: ТНПСЛ, ЛНМХРНПХМЦ, РНО ЯЮИРНБ
*/
请大家看清楚这作者,他编辑了很多niu x 的插件的,前面貌似发过了类似的,这与那个不同!! |
|