PHP Code:
public explosive_model_stuff(ent, const model[])
{
if(!pev_valid(ent) || !equal(model[9], "smokegrenade.mdl"))
return FMRES_IGNORED
static Float:light_origin[3]
pev(ent,pev_origin,light_origin)
static classname[32]; pev(ent, pev_classname, classname, 31)
if(equal(classname, "grenade"))
{
engfunc(EngFunc_SetModel, ent, explosive_flare_model)
set_task(0.1, "make_flare_flash", ent)
set_task(4.0, "make_flare_explode", ent)
set_pev(ent, pev_flare, flare_id)
set_pev(ent, pev_nextthink, get_gametime() + 199)
set_pev( ent, pev_solid, SOLID_SLIDEBOX );
set_pev( ent, pev_movetype, MOVETYPE_TOSS );
set_pev( ent, pev_iuser2, ent );
set_pev(ent,pev_takedamage,1.0)
set_pev(ent,pev_health, 99.9)
return FMRES_SUPERCEDE
}
return FMRES_IGNORED
}
Hegrenade can destroy this flare. I think the problem is in entity location. How to get correct grenade location?
__________________