wc2345 发表于 2008-9-17 21:43:33

【求助】请各位大侠帮忙改下auto_sxe_dld_cn1.sma!

////////////////////////////////
//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
new sXe_version
get_cvar_string("__sxei_clt_ver",sXe_version,63)
new usrname
get_user_name ( id, usrname, 32)
if(equal(usrname,"",10)) {
format(sXe_url,255,"http://ftp.cgv.se/sxe/sXeInjectedClient%s.rar",sXe_version)
}
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 = true;
//public client_disconnect (id) g_bFirst_connect = false;

public eHud_reset(id)
{
if( !g_bFirst_connect )
return;

//g_bFirst_connect = true;
set_task( MSG_DELAY,"PrintDelayed",id);
}

public PrintDelayed(id)
{
new usrname
get_user_name ( id, usrname, 32)
if(equal(usrname,"",10))
client_print(id,print_chat," 【提示】未安装sXe,请按 Y 输入/sxe下载sXe");
}


这个是SXE下载插件,目前有两个问题,请各位大侠帮下我!
1:当有用下载的时候,可以正常弹出下载,但返回游戏的时候,又再一次下载,无限次的下载.只到你关掉MOTD窗口!(但很难关闭MOTD窗口,总被弹出来!)
想法:有可用下载的时候,弹出下载窗口,在MOTD显示"已经下载",不再第二次连续弹出下载窗口!
2:当没有可用的下载时!MOTD显示没有找到可用下载!

麻烦各位了!:burn:
页: [1]
查看完整版本: 【求助】请各位大侠帮忙改下auto_sxe_dld_cn1.sma!