Mira cumbiero te hice esto asi rapido , lo he probado y funciona muy bien.
Es como una idea para que tengas como hacer lo que necesitas
PHP Code:
public plugin_precache () {
precache_model("models/chick.mdl")
}
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say a", "blabla")
RegisterHam(Ham_Killed, "info_target", "fw_NPCKilled")
}
public blabla ( id ) {
new Float:origin[3]
entity_get_vector(id, EV_VEC_origin, origin)
new ent = create_entity("info_target")
entity_set_model(ent, "models/chick.mdl")
entity_set_string(ent, EV_SZ_classname, "NPC")
entity_set_size(ent, Float:{-1.0,-1.0,-1.0}, Float:{1.0, 1.0, 1.0})
entity_set_int(ent, EV_INT_movetype, MOVETYPE_TOSS)
entity_set_int(ent, EV_INT_solid, SOLID_BBOX)
entity_set_origin(ent, origin)
origin[2] += 50
entity_set_origin(id, origin)
entity_set_float(ent, EV_FL_takedamage, 1.0)
entity_set_float(ent, EV_FL_health, 30.0)
}
public fw_NPCKilled ( ent, attacker ) {
new szClassname[32], name[32]
get_user_name(attacker, name, sizeof name - 1)
entity_get_string(ent, EV_SZ_classname, szClassname, charsmax(szClassname))
if (!equali(szClassname, "NPC")) return HAM_IGNORED;
if (is_user_connected(attacker))
{
client_print(0, print_chat, "Player: %s ha matado al Boss.", name)
remove_entity(ent)
}
return HAM_SUPERCEDE;
}
Espero que te sirva o te ayude en algo.