AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Remove Doors (https://forums.alliedmods.net/showthread.php?t=25304)

mptijsma 03-11-2006 13:18

Remove Doors
 
[Motivation / Idea]
Just for making maps with noisy doors more fun.

[Description]
This plugin will remove all doors from any map.

[Settings]
Set the CVAR 'removedoors_auto' to 1 to automatically remove doors each map.
Set it to 0 and place the command 'removedoors' in your map config if you want to remove doors for this map.

Greetz,

Thijs

Deviance 03-11-2006 13:20

lol, your really fast whit the plugins, dude :)
i like the idea, this is going up to mine server now ;)

Brad 03-11-2006 13:29

Have you tested it with sliding doors?

mptijsma 03-11-2006 13:40

Quote:

Originally Posted by Brad
Have you tested it with sliding doors?

Yes, I have tested it with cs_assault.

VEN 03-11-2006 13:55

edit:
1. Do not remove doors every new round, do it in plugin_init - that's enough.
2. Fix the warnings.

mptijsma 03-11-2006 14:00

Quote:

Originally Posted by VEN
1. You must reset door entity index after first while
2. Do not remove every new round, do it in plugin_init for example - that's enough.
3. Fix the warnings.

1. Why should I do that? It doesn't change the working (I actually thought about that), because Door index will be set on beginning of the while.

2. Okay, fixed, thanks for your contribution.
3. I know how to fix those, but my way is much work, I thought keeping this statement was easier, and the code is correct, right?

If I'm wrong, please reply.

Deviance 03-11-2006 14:04

Code:
#include <amxmodx> #include <engine> public plugin_init() {     register_plugin("Remove Doors","1.1","[BSP] Thijs");     set_task(1.0,"RemoveDoors"); } public RemoveDoors() {     new Door;     while((Door = find_ent_by_class(Door,"func_door_rotating"))) {         remove_entity(Door);     }     while((Door = find_ent_by_class(Door,"func_door"))) {         remove_entity(Door);     } }

mptijsma 03-11-2006 14:08

Yeah I saw the typo.

Will take more time to test my plugins ^^.

VEN 03-11-2006 14:15

edit: true

Brad 03-11-2006 15:39

VEN: His code is fine.

The first loop won't end until Door is 0, meaning no more doors were found.


All times are GMT -4. The time now is 16:45.

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