:gogo: [attach] ////////////////////////////////
//edit by Cr@zyTreE 2008.05.14
///////////////////////////////
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "Automatic sXe Downloader"
#define VERSION "1.1"
#define AUTHOR "Kimi"
#define MSG_DELAY 6.0
#define MAX_CLIENTS 32
new bool:g_bFirst_connect[ MAX_CLIENTS + 1 ];
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR);
register_clcmd("say /sxe","_show_sxe");
register_event("ResetHUD","eHud_reset","be");
}
public _show_sxe(id)
{
new sXe_url[256]
new sXe_version[64]
get_cvar_string("__sxei_clt_ver",sXe_version,63)
new usrname[33]
get_user_name ( id, usrname, 32)
if(equal(usrname,"[NO-sXe-I]",10)) {
[color="red"]format(sXe_url,255,"http://ftp.cgv.se/sxe/sXeInjectedClient%s.rar",sXe_version)[/color]
}
else format(sXe_url,255,"<head><META http-equiv=Content-Type content='text/html ;charset=UTF-8'></head><body bgcolor=black><center><font size=4 color=red>您已安装并使用与服务器相对应的sXe版本,无需下载</font>")
show_motd(id,sXe_url,"sXe客户端下载");
return 1;
}
public client_putinserver(id) g_bFirst_connect[id] = true;
//public client_disconnect (id) g_bFirst_connect[id] = false;
public eHud_reset(id)
{
if( !g_bFirst_connect[id] )
return;
//g_bFirst_connect[id] = true;
set_task( MSG_DELAY,"PrintDelayed",id);
}
public PrintDelayed(id)
{
new usrname[33]
get_user_name ( id, usrname, 32)
if(equal(usrname,"[NO-sXe-I]",10))
client_print(id,print_chat," 【提示】未安装sXe,请按 Y 输入/sxe下载sXe");
[/attach]
这个插件安装以后!能正常下载SXE!但出现的问题是无限下载SXE!(输入/sxe后,游戏被下载窗口弹出,下载完后,切换到游戏,立刻又被下载窗口弹出,重新下载SXE.)
请各位大侠帮帮我!谢谢!本人玩的是胜利之日DOD! |