This should work.
PHP Code:
#define TASK_REMOVE 2684
#define ID_REMOVE (taskid - TASK_REMOVE)
..........
entity_set_string( ent, EV_SZ_classname, "poison" );
set_task( 8.0, "remove_this_ent", ent+TASK_REMOVE );
..........
public remove_this_ent(taskid)
{
if(!is_valid_ent(ID_REMOVE)) return;
remove_entity(ID_REMOVE);
}
public OnEndRound()
{
RemoveAllPoisonEnt()
}
RemoveAllPoisonEnt()
{
new ent = find_ent_by_class(-1, "poison")
while(ent > 0)
{
if(is_valid_ent(ent))
{
remove_task(ent+TASK_REMOVE)
remove_entity(ent)
}
ent = find_ent_by_class(-1, "poison")
}
}
__________________