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

Remove Doors


Post New Thread Reply   
 
Thread Tools Display Modes
jRaven
AMX Mod X Beta Tester
Join Date: Jan 2006
Location: IA, USA
Old 09-11-2006 , 14:43   Re: Remove Doors
Reply With Quote #41

I modified it a bit for my own use, but the code you have there will cause an infinite loop and hang a server. Thank karlos for the fix.

Try this instead (I tested it -- it works beautifully):
[[I'd rather use a cfg file per-map instead of cvars]]
Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>

public plugin_init() {
    register_plugin("Remove Doors","1.4","[BSP] Thijs");
    register_concmd("amx_removedoors","RemoveDoors",ADMIN_LEVEL_C,"- remove ALL DOORS from a map");
}

public RemoveDoors() {

    new Door = -1;
    while( ( Door = find_ent_by_class(Door,"func_door") ) > 0 )
        remove_entity(Door);

    Door = -1
    while( ( Door = find_ent_by_class(Door,"func_door_rotating") ) > 0 )
        remove_entity(Door);

    return PLUGIN_HANDLED;
}
jRaven is offline
Send a message via ICQ to jRaven Send a message via AIM to jRaven
Spanky McNutnut
AMX Mod X Beta Tester
Join Date: Feb 2006
Old 09-11-2006 , 18:51   Re: Remove Doors
Reply With Quote #42

What about the cvar?
Spanky McNutnut is offline
jRaven
AMX Mod X Beta Tester
Join Date: Jan 2006
Location: IA, USA
Old 09-11-2006 , 20:04   Re: Remove Doors
Reply With Quote #43

Quote:
Originally Posted by Spanky McNutnut View Post
What about the cvar?
There was a cvar to enable/disable the plugin, and I omitted copying it over in my work.
jRaven is offline
Send a message via ICQ to jRaven Send a message via AIM to jRaven
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 09-12-2006 , 01:51   Re: Remove Doors
Reply With Quote #44

I found no plugin in the first post....if a plugin doesn't show up then this will be trashed.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Thijs Tijsma
Junior Member
Join Date: Feb 2007
Old 02-25-2007 , 14:48   Re: Remove Doors
Reply With Quote #45

Hi there.

As you can see, I (formerly known as 'mptijsma' here) am back at the AMXX forums.

Will pick up the development of this plugin soon again.

I posted this message in several plugin threads I created, I hope this is okay.

Greetz,

Thijs
Thijs Tijsma is offline
Siska1
Senior Member
Join Date: Feb 2020
Location: BedRock
Old 08-02-2023 , 09:47   Re: Remove Doors
Reply With Quote #46

del
__________________

Last edited by Siska1; 08-02-2023 at 11:34.
Siska1 is offline
Send a message via Skype™ to Siska1
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 04:10.


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