下面是引用 waipun 于 2011-07-27 16:37 发表的 请问"killer杀死人之后对killer做指令"的指令是什么:
如题
谢大大
复制程式
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
public plugin_init()
{
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
}
public fw_PlayerKilled(victim, attacker, shouldgib)
{
//做指令的地方…
}
//对BOT做debug的内容…不用动
new Debug
public client_putinserver(id)
{
if(Debug == 1) return
new classname[32]
pev(id,pev_classname,classname,31)
if(!equal(classname,"player"))
{
Debug=1
remove_task(id+9950)
set_task(1.0,"_Debug",id+9950)
}
}
public _Debug(taskid)
{
new id = taskid-9950
RegisterHamFromEntity(Ham_Killed,id,"fw_PlayerKilled")
}