Quote:
Originally Posted by Exolent[jNr]
Can you show the code?
|
Sure:
PHP Code:
public plugin_init()
{
register_plugin("Test","0.0","OT")
RegisterHam(Ham_Think,"class","ham_think")
register_forward(FM_Think,"fm_think")
new ent = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) )
set_pev( ent, pev_classname, "class" )
set_pev( ent, pev_nextthink, get_gametime() + 0.1)
}
public ham_think(ent)
{
server_print("Yummy ent")
set_pev( ent, pev_nextthink, get_gametime() + 0.1)
return HAM_IGNORED
}
public fm_think(ent)
{
static classname[6];
pev( ent, pev_classname, classname, sizeof classname - 1 );
if( !equal( classname, "class" ) )
return FMRES_IGNORED;
server_print("Fake entity, no taste")
set_pev( ent, pev_nextthink, get_gametime() + 0.1)
return FMRES_IGNORED
}
__________________