下面是引用 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")
}