I have a class that can create poison bombs and it has a task to remove the entity. When I try to remove this entity and it's task at the end of the round the server crashes.
My question is, how can I remove this entity safely if it is still there at the end of the round?
PHP Code:
..........
entity_set_string( ent, EV_SZ_classname, "poison" );
set_task( 8.0, "remove_this_ent", ent );
..........
public remove_this_ent( ent )
{
if( !is_valid_ent( ent ) )
return;
remove_entity( ent );
}
Thanks!