|
发表于 2008-12-7 17:40:06
|
显示全部楼层
来自 中国–广东–惠州–惠城区
回复: 求助关于人质模式下的几个事件出错问题
试下这样,我没试过.
[php]
#include <amxmodx>
#include <amxmisc>
#define PLUGIN_NAME "New Plug-In"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "zwfgdlc"
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
register_logevent("Team_Win",6,"0=Team","2=triggered","3=Hostages_Not_Rescued","3=All_Hostages_Rescued");
register_logevent("Hostage_Killed",3,"1=triggered","2=Killed_A_Hostage");
register_logevent("Hostages_Rescued",3,"1=triggered", "2=Rescued_A_Hostage");
register_event("TextMsg", "Injured_Hostage", "be", "1=4", "2=#Injured_Hostage")
return PLUGIN_CONTINUE;
}
public Team_Win()
{
new reason[32];
read_logargv(3,reason,31);
if(equali(reason,"All_Hostages_Rescued")){
//人质被救出,CT胜利
client_print(0,print_chat,"所有人质被救出,CT胜利!!!!")
}else{
//人质没有被救出,TE胜利
client_print(0,print_chat,"没有救出人质,TE胜利!!!!")
}
}
public Hostage_Killed()
{
new log[64],name[32];
read_logargv(0,log,63);
parse_loguser(log,name,31);
client_print(0,print_chat,"%s杀了一个人质",name)
}
public Hostages_Rescued()
{
new log[64],name[32];
read_logargv(0,log,63);
parse_loguser(log,name,31);
client_print(get_user_index(name),print_chat,"你救出了一个人质!!!!")
}
public Injured_Hostage(id)
{
client_print(id,print_chat,"你伤害了一个人质!!!!")
}[/php] |
|