Raised This Month: $ Target: $400
 0% 

[SOLVED] find_ent_by_owner() on client_disconnect()


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 07-27-2011 , 14:56   Re: [Help] find_ent_by_owner() on client_disconnect()
Reply With Quote #1

Ok after 2 hours in server using this code:
PHP Code:
RemovePlayerEntity(id

    static 
ent 
    ent 
= -
     
    
while ((ent find_ent_by_class(entCLASSNAME))) 
    { 
        if(
pev(entpev_owner) != id
            continue 
         
        if(
pev_valid(ent)) remove_entity(ent
    } 

No error log found yet thanks guys.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-27-2011 , 14:58   Re: [Help] find_ent_by_owner() on client_disconnect()
Reply With Quote #2

You could try to hook FM_ClientDisconnect PRE and then send find_ent_by_owner, but if you need only a specific classname, then the code you actually have is ok.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply



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:09.


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