Raised This Month: $51 Target: $400
 12% 

Solved Deleting entities without crashing server


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Naleksuh
Member
Join Date: Dec 2018
Old 04-11-2020 , 19:47   Deleting entities without crashing server
Reply With Quote #1

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?

Last edited by Naleksuh; 04-12-2020 at 20:26.
Naleksuh is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:47.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode