Raised This Month: $ Target: $400
 0% 

Correct safety remove entity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Arje
Senior Member
Join Date: Apr 2020
Location: Córdoba, Argentina
Old 10-15-2023 , 12:04   Re: Correct safety remove entity
Reply With Quote #11

Quote:
Originally Posted by Natsheh View Post
This is the proper way to remove entities with specific classname by owner...

PHP Code:
new ent MAX_PLAYERS 1;

while( (
ent find_ent_by_owner(entgBlackHole_EntNameid)) > 0)
{
    
set_pev(entpev_flagsFL_KILLME);
    
dllfunc(DLLFunc_Thinkent);

Thanks lexzor and Natsheh for the help, both codes worked, although I stick with what you said that it is the best way to eliminate entities so I will use it,

On the other hand, I have a question regarding eliminating by owner, that is, it will only eliminate the entities that were created by that owner, or it will eliminate all entities independently of the owner, that is, I do not have to create a array for each entity created to correspond to each player,and then eliminate the entities that player is the owner?
Arje 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 07:37.


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