#include <amxmodx>
#include <fakemeta>
#include <zombie_mode_ai>

new g_zclass_ghost, modelindex
new const zb_model[] = "models/zombie_mode_ai/npc_zombie_ghost.mdl"

public plugin_init()
{
	register_plugin("[ZMAI] Zombie Class: Ghost", "1.0", "Dias")
}

public plugin_precache()
{
	modelindex = precache_model(zb_model)
	g_zclass_ghost = zmai_register_class(100.0, 200.0, zb_model, modelindex)
}

public zmai_zombie_create(ent)
{
	if (zmai_is_zombie(ent) && zmai_is_valid_zombie(ent) && zmai_get_class(ent) == g_zclass_ghost)
	{
		fm_set_rendering(ent, kRenderFxNone, 0, 0, 0, kRenderNormal, 10)
	}
}

// Set entity's rendering type (from fakemeta_util)
stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16)
{
	static Float:color[3]
	color[0] = float(r)
	color[1] = float(g)
	color[2] = float(b)
	
	set_pev(entity, pev_renderfx, fx)
	set_pev(entity, pev_rendercolor, color)
	set_pev(entity, pev_rendermode, render)
	set_pev(entity, pev_renderamt, float(amount))
}
