Quote:
Originally Posted by ConnorMcLeod
But find_ent_by_owner doesn't work, that's the point here ;)
You could save ents in an dynamic array, i mean a 33 array, in each cell a dynamic array that holds owner ents, then you can retrieve them easily on disconnect. There should be a better way, but that was just a coming idea 
|
No, I just want to delete the ents when the owner disconnects... but I knew how it's done in the alternative way, I just wanted to know if it's required :}
PHP Code:
public client_disconnect(id)
{
new ent = -1
while((ent = find_ent_by_class(ent, "ent_class")) != 0)
if(entity_get_edict(ent, EV_ENT_owner) == id)
remove_entity(ent)
ent = -1
while((ent = find_ent_by_class(ent, "ent_class_two")) != 0)
if(entity_get_edict(ent, EV_ENT_owner) == id)
remove_entity(ent)
}
end of topic
__________________