Quote:
Originally Posted by Natsheh
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(ent, gBlackHole_EntName, id)) > 0)
{
set_pev(ent, pev_flags, FL_KILLME);
dllfunc(DLLFunc_Think, ent);
}
|
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?