Raised This Month: $12 Target: $400
 3% 

Removing dynamic props


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Muridias
Member
Join Date: Feb 2008
Old 02-11-2008 , 20:24   Removing dynamic props
Reply With Quote #1

Is there a way to loop through the map props to find certain props in the map and have them remove? Example - I want to remove the health locker from TF2.

Reason I need the health lockers remove because when I remove players weapons and they go to a health locker if gives all their weapons back.

Last edited by Muridias; 02-11-2008 at 20:48.
Muridias is offline
Nican
Veteran Member
Join Date: Jan 2006
Location: NY
Old 02-11-2008 , 21:07   Re: Removing dynamic props
Reply With Quote #2

From my teleporter plugin:

PHP Code:
new i;
new 
maxents GetMaxEntities();
for(
24<= maxentsi++){
         if(
IsValidEntity(i)){
            
GetEntityNetClass(iclassname64);
            if(
StrEqual(classname"CObjectTeleporter")){                
                
infoLIST_SENTRY ] = i;
                
infoLIST_TEAM ] = GetEntData(iTeamOffset4);
                
infoLIST_OWNER ] = GetEntDataEnt2(iOwnerOffset);
                
                
//LogMessage("Found: %d %d %d", i, info[ LIST_TEAM ], info[ LIST_OWNER ]);
                
                
PushArrayArray(TeleporterListinfo);             
            }
        }
    } 
You will just have to find the locker net class name...

Idea: Instead of removing them, just misplace them, or you will have a difficult time putting them back.
__________________
http://www.nican132.com
I require reputation!
Nican is offline
Send a message via ICQ to Nican Send a message via MSN to Nican
Muridias
Member
Join Date: Feb 2008
Old 02-11-2008 , 22:22   Re: Removing dynamic props
Reply With Quote #3

You sir is awesome. Thanks a lot.
Muridias is offline
Muridias
Member
Join Date: Feb 2008
Old 02-11-2008 , 22:40   Re: Removing dynamic props
Reply With Quote #4

While I made a loop that printed out every single CXXXXX.

It's probably under a CDynamicProp. I can't remove all props. So Is there a way return their properties?

Last edited by Muridias; 02-11-2008 at 22:43.
Muridias is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 02-12-2008 , 00:28   Re: Removing dynamic props
Reply With Quote #5

Try using GetEdictClassname(i) and if it equals func_regenerate then RemoveEdict(i). That will get rid of the trigger area that makes the lockers work.
bl4nk is offline
Muridias
Member
Join Date: Feb 2008
Old 02-14-2008 , 21:35   Re: Removing dynamic props
Reply With Quote #6

I will try that. I'm been busy lately. I will come back and post if it worked for me. Thanks for the help guys.
Muridias 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 19:07.


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