Raised This Month: $ Target: $400
 0% 

[clarified] entities with owner delete themselves ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-16-2009 , 15:31   Re: entities with owner delete themselves ?
Reply With Quote #6

Quote:
Originally Posted by ConnorMcLeod View Post
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(entEV_ENT_owner) == id)
                  
remove_entity(ent)
 
     
ent = -1
 
     
while((ent find_ent_by_class(ent"ent_class_two")) != 0)
            if(
entity_get_edict(entEV_ENT_owner) == id)
                  
remove_entity(ent)

end of topic
__________________
Hunter-Digital 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 01:30.


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