Hello. I attempt to delete all of a certain entity from a map, with something like this:
Code:
public void OnEntityCreated(int entity, const char[] classname){
if(StrEqual(classname, "trigger_capture_area")){
RemoveEntity(entity);
}
}
However, when a server's map changes, this code is very likely to cause the server to crash during the map change. I have tried countless variations including round start, accepting Kill input, server commands, timer-based, and more. There seems to be no way to do this without risking a server crash (while having zero problems without this plugin).
Is there any good way to accomplish this?