#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <cstrike>
#include <zombieplague>

new g_fire
new const nemesis_die[] = "BloodyDay/neme_lose.wav"

public plugin_precache()
{
   g_fire=precache_model("sprites/zr_boss_killed.spr")
   precache_sound( nemesis_die )
}
public plugin_init()
{
   register_event("DeathMsg","onDeath","a")
}
public onDeath()
{
new victim=read_data(2)

if(zp_get_user_nemesis(victim))
{
set_task(3.0,"fire",victim)      
}
}
fire_zombie(origin[3])
{
   message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
   write_byte(TE_SPRITE)
   write_coord(origin[0])
   write_coord(origin[1])
   write_coord(origin[2]+=30)
   write_short(g_fire)
   write_byte(8)
   write_byte(255)
   message_end()
}
public fire(victim)
{
   new origin[3]
   get_user_origin(victim,origin)
   
   fire_zombie(origin)
   emit_sound(victim,CHAN_ITEM,"nemesis_die",0.6,ATTN_NORM,0,PITCH_NORM )
}