Hello
I found this snippet in this forum, however it doesn't work.
Can someone tell me what's wrong or what am I missing?
PHP Code:
[...]
new Ent = engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"info_target"))
set_pev(Ent,pev_classname,g_Classname)
set_pev(Ent,pev_nextthink,1.0)
register_forward(FM_Think,"ForwardThink")
}
public ForwardThink(Ent)
{
if(get_pcvar_num([enabled]) || !b_DamagedRecently || GetPlayerCount(2) == 0)
return FMRES_IGNORED
static Classname[33]
pev(Ent,pev_classname,Classname,32)
if(!equal(Classname,g_Classname))
return FMRES_IGNORED
[integer]--
set_pev(Ent,pev_nextthink,1.0)
return FMRES_HANDLED
}
Thanks in advance
__________________