AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Force a Door to Stay Open (https://forums.alliedmods.net/showthread.php?t=141138)

shadow.hk 10-20-2010 01:52

Force a Door to Stay Open
 
Is there a way you can stop a door from closing after it's been opened. I've tried setting the doors' SF_DOOR_NO_AUTO_RETURN to 1 but that doesn't seem to work.

shuttle_wave 12-23-2010 00:14

Re: Force a Door to Stay Open
 
bump. i wanna find out too.

Firippu 12-23-2010 01:59

Re: Force a Door to Stay Open
 
This modifies the func_door entity to wait 0 seconds before closing, apparently 0 is infinite. The doors reset and are closed at every round start.

Code:

#include <amxmodx>
#include <engine>

#define seconds "0"

public plugin_init() {
    register_plugin("New Plugin","1.0","Unknown")

    new ent
    while((ent = find_ent_by_class(ent,"func_door")) != 0) {
        DispatchKeyValue(ent,"wait",seconds)
    }
}



All times are GMT -4. The time now is 10:28.

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