Raised This Month: $32 Target: $400
 8% 

[L4D/2] CoopDoorAntiClose


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Plugin ID:
3873
Plugin Version:
1.1
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    This prevents the door of the start saferoom to be closed after it is fully opened.
    Old 09-02-2013 , 10:18   [L4D/2] CoopDoorAntiClose
    Reply With Quote #1

    Yesterday I got a request from disawar1 about this (http://forums.alliedmods.net/showpos...01&postcount=8), so here it is.

    This prevents people from exploiting the tank ai by locking themselves up in the start saferoom, therefore making the tank punch the saferoom door with no avail when positioned correctly.
    This issue is circumvented by the plugin by making it unable for that door to be closed again once it has been opened.

    Changes 1.1:

    -Use of OnEntityCreated
    Attached Files
    File Type: sp Get Plugin or Get Source (coopdooranticlose.sp - 2221 views - 1.1 KB)

    Last edited by Dr. Greg House; 09-03-2013 at 19:53.
    Dr. Greg House is offline
    eric0279
    AlliedModders Donor
    Join Date: May 2007
    Old 09-02-2013 , 11:54   Re: [L4D/2] CoopDoorAntiClose
    Reply With Quote #2

    Hello,

    coop but where have you defined gamemode or for all gamemode?
    eric0279 is offline
    Dr. Greg House
    Professional Troll,
    Part-Time Asshole
    Join Date: Jun 2010
    Old 09-02-2013 , 12:11   Re: [L4D/2] CoopDoorAntiClose
    Reply With Quote #3

    I have not restricted this to any gamemode because a) this will be applied to versus anyway and b) I'd have to check for every mutation to be compatible with that (in which case I'd have to keep a list of all mutations updated as they will be returned as the current gamemode) which is unnecessary because as stated above in a) in the worst case it will just set the input again.
    Dr. Greg House is offline
    eric0279
    AlliedModders Donor
    Join Date: May 2007
    Old 09-02-2013 , 13:10   Re: [L4D/2] CoopDoorAntiClose
    Reply With Quote #4

    ok thanks
    eric0279 is offline
    Dr. Greg House
    Professional Troll,
    Part-Time Asshole
    Join Date: Jun 2010
    Old 09-02-2013 , 13:22   Re: [L4D/2] CoopDoorAntiClose
    Reply With Quote #5

    In case there will be any issue with any gamemode, please tell me so I can set it as an exception. Although I am quite sure there won't be any issues regarding gamemodes.
    Dr. Greg House is offline
    eric0279
    AlliedModders Donor
    Join Date: May 2007
    Old 09-02-2013 , 16:58   Re: [L4D/2] CoopDoorAntiClose
    Reply With Quote #6

    i play only versus sorry ^^
    eric0279 is offline
    Jоnny
    Senior Member
    Join Date: Jun 2007
    Old 09-05-2013 , 03:04   Re: [L4D/2] CoopDoorAntiClose
    Reply With Quote #7

    I will use it with a little optimization

    Code:
    #include <sourcemod>
    #include <sdktools>
    
    new bool:SkipEntityCheck = false;
    public Plugin:myinfo = 
    {
        name = "CoopDoorAntiClose",
        author = "PP(R)TH: Dr. Gregory House",
        description = "This prevents the door of the start saferoom to be closed after it is fully opened.",
        version = "1.0",
        url = "http://forums.alliedmods.net/showthread.php?t=225240"
    }
    
    public APLRes:AskPluginLoad2(Handle:myself, bool:late, String:error[], err_max)
    {
        decl String:gameName[32];
        GetGameFolderName(gameName, sizeof(gameName));
        if (StrContains(gameName, "left4dead") > -1) return APLRes_Success;
        else
        {
            strcopy(error, err_max, "This plugin only supports L4D(2).");
            return APLRes_SilentFailure;
        }
    }
    
    public OnPluginStart()
    {
        HookEvent("round_start_pre_entity", Event_RoundEnd);
        HookEvent("map_transition", Event_RoundEnd);
    }
    
    public Action:Event_RoundEnd(Handle:event, const String:name[], bool:dontBroadcast)
    {
        SkipEntityCheck = false;
    }
    
    public OnEntityCreated(entity, const String:classname[])
    {
        if (SkipEntityCheck) return;
        if (StrEqual(classname, "prop_door_rotating_checkpoint") && GetEntProp(entity, Prop_Send, "m_eDoorState") == 0) HookSingleEntityOutput(entity, "OnFullyOpen", OnStartSFDoorFullyOpened, true);
    }
    
    public OnStartSFDoorFullyOpened(const String:output[], caller, activator, Float:delay)
    {
        AcceptEntityInput(caller, "Lock");
        SkipEntityCheck = true;
    }
    Jоnny is offline
    probably2000
    Junior Member
    Join Date: Sep 2013
    Old 10-10-2013 , 02:16   Re: [L4D/2] CoopDoorAntiClose
    Reply With Quote #8

    Hello,nice plugin ,really.but could u help me make a plugin that makes player inside the saferoom before gamestart.because in my sever ,there is always a problem that when we were born not in saferoom but in somewhere else .plz...!! help me
    probably2000 is offline
    Dr. Greg House
    Professional Troll,
    Part-Time Asshole
    Join Date: Jun 2010
    Old 10-14-2013 , 22:30   Re: [L4D/2] CoopDoorAntiClose
    Reply With Quote #9

    @Jоnny; I try to not use events because most of them are barely maintained and therefore unreliable. I'm actually not even sure if map_transition fires.

    @probably2000: I am not sure what exactly this is about and how it is related to this specific plugin, so I think you are better off asking this question in the request section.
    __________________
    Santa or Satan?

    Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.

    Last edited by Dr. Greg House; 10-14-2013 at 22:32.
    Dr. Greg House is offline
    Reply


    Thread Tools
    Display Modes

    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 22:10.


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