Raised This Month: $23 Target: $400
 5% 

[L4D & L4D2] Lock Doors (1.2) [10-May-2020]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
7030
Plugin Version:
1.2
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    4 
    Plugin Description:
    Replicates an old feature Valve removed, allowing players to lock and unlock doors. Also sets open/closed/locked doors health.
    Old 04-07-2020 , 03:22   [L4D & L4D2] Lock Doors (1.2) [10-May-2020]
    Reply With Quote #1

    About:
    • Valve had originally released or were planning on implementing the ability for Survivors to lock doors.
    • This plugin brings that to life with additional features.
    • Customise the health of doors when they spawn, are opened, closed or locked.
    • This will not affect saferoom doors or existing locked doors to avoid breaking certain maps.
    • Keybind: Shift + E or Ctrl + E set by l4d_lock_doors_keys cvar.


    Thanks:
    • Cuba - For the request.
    • Lux - As standard.


    Cvars:

    Saved to l4d_lock_doors.cfg in your servers \cfg\sourcemod\ folder.

    PHP Code:
    // 0=Plugin off, 1=Plugin on.
    l4d_lock_doors_allow "1"

    // 0=Off. Percentage of health to set when the door is locked.
    l4d_lock_doors_health_lock "2.0"

    // 0=Off. Percentage of health to set when the door is open.
    l4d_lock_doors_health_open "0.5"

    // 0=Off. Percentage of health to set when the door is shut.
    l4d_lock_doors_health_shut "1.0"

    // 0=Off. How much health doors have on spawn (840 game default).
    l4d_lock_doors_health_total "840"

    // Which key combination to lock/unlock doors: 1=Shift (walk) + E (use). 2=Ctrl (duck) + E (use).
    l4d_lock_doors_keys "1"

    // Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
    l4d_lock_doors_modes ""

    // Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
    l4d_lock_doors_modes_off ""

    // Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
    l4d_lock_doors_modes_tog "0"

    // 0=Off. Display a chat message when: 1=Locking doors. 2=Unlocking doors. 4=To self. 8=To all players. Add numbers together.
    l4d_lock_doors_text "7"

    // 0=Off. Vocalize when locking doors.
    l4d_lock_doors_vocalize "1"

    // Lock Doors plugin version
    l4d_lock_doors_version 


    Changes:
    Code:
    1.2 (10-May-2020)
        - Extra checks to prevent "IsAllowedGameMode" throwing errors.
        - Various changes to tidy up code.
    
    1.1 (08-Apr-2020)
        - Changed the lock sound and increased volume.
        - Fixed not working on server start or when the plugin was enabled again. Thanks to "Cuba" for reporting.
    
    1.0 (07-Apr-2020)
        - Initial Release.

    Installation:
    1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_lock_doors.sp - 168 views - 19.4 KB)
    __________________

    Last edited by Silvers; 05-10-2020 at 06:53.
    Silvers is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 04-07-2020 , 23:25   Re: [L4D & L4D2] Lock Doors (1.0) [07-Apr-2020]
    Reply With Quote #2

    Quote:
    Originally Posted by login101 View Post
    I want each sound effect added
    Please edit your post and remove quoting the entire first post. Thanks.

    Sound effects already added for lock/unlock.

    Code:
    1.1 (08-Apr-2020)
        - Changed the lock sound and increased volume.
        - Fixed server start or when the plugin was enabled again. Thanks to "Cuba" for reporting.
    __________________

    Last edited by Silvers; 04-08-2020 at 07:59.
    Silvers is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine
    Old 04-08-2020 , 15:48   Re: [L4D & L4D2] Lock Doors (1.1) [08-Apr-2020]
    Reply With Quote #3

    Pretty interesting feature )

    I'm curious where database of all valve removed features is exist ? =)
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch)
    [My plugins] [My tools] [GitHub] [Articles]
    Dragokas is offline
    SkiPlix
    Member
    Join Date: Dec 2016
    Location: Argentina
    Old 04-10-2020 , 06:42   Re: [L4D & L4D2] Lock Doors (1.1) [08-Apr-2020]
    Reply With Quote #4

    Seems this makes the server crash when you're stuck between the door, and you lock/unlock it.

    Might be a random crash though.

    Last edited by SkiPlix; 04-10-2020 at 06:44. Reason: Grammar...
    SkiPlix is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 04-10-2020 , 07:48   Re: [L4D & L4D2] Lock Doors (1.1) [08-Apr-2020]
    Reply With Quote #5

    Quote:
    Originally Posted by SkiPlix View Post
    Seems this makes the server crash when you're stuck between the door, and you lock/unlock it.

    Might be a random crash though.
    It's not possible to lock/unlock the door while it's in transition. The door must be fully closed. I also just tried and the door opens again after getting stuck on the player. Unless you have an accelerator crash log I'm ignoring this report. Thanks.
    __________________
    Silvers is offline
    TypicalType
    Junior Member
    Join Date: Mar 2020
    Location: Brazil
    Old 04-28-2020 , 19:59   Re: [L4D & L4D2] Lock Doors (1.1) [08-Apr-2020]
    Reply With Quote #6

    how to lock doors?
    TypicalType is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 04-28-2020 , 20:03   Re: [L4D & L4D2] Lock Doors (1.1) [08-Apr-2020]
    Reply With Quote #7

    Quote:
    Originally Posted by TypicalType View Post
    how to lock doors?
    Quote:
    PHP Code:
    // Which key combination to lock/unlock doors: 1=Shift (walk) + E (use). 2=Ctrl (duck) + E (use).
    l4d_lock_doors_keys "1" 
    __________________
    Silvers is offline
    Sunyata
    Senior Member
    Join Date: Nov 2017
    Old 07-18-2020 , 05:56   Re: [L4D & L4D2] Lock Doors (1.2) [10-May-2020]
    Reply With Quote #8

    This is an interesting plug-in. I've just started using it on my server. It's good! And even though this plug-in only allows players to manually lock/unlock closet doors, I was wondering would be possible to add to your config file an option to have an extra Cvar to have every rescue closet door locked at the start of each round in every map, mainly so that only my member-players only unlock these closet doors when they get to each one.

    I really do find it annoying sometimes, when some noob player unwarily opens an empty rescue closet without realizing that the door they just opened now stops a player from re-spawning after that door's been opened. I only let members use this lock/unlock activation key on my server, as I wont allow unwary or noob public players to use this unlock feature at all.

    Sunyata
    Sunyata is offline
    Sunyata
    Senior Member
    Join Date: Nov 2017
    Old 07-19-2020 , 04:38   Re: [L4D & L4D2] Lock Doors (1.2) [10-May-2020]
    Reply With Quote #9

    After further tests, I see that this lock feature applies to all doors and not just rescue closets. So my above suggestion (post 8 ) would be impractical anyway. So instead of the above suggestion, would it be possible to add a timer to the locked door instead - as optional.

    My reason for this is that sometimes it would be nice to lock a nearby rescue closet, to stop some unwitting player/s from releasing a player that is re-spawning in the nearby closet, so that I could perform CPR on that dead player/bot instead, but after they were resuscitated, the timer would unlock the rescue closet door. Timer settings could be set anywhere from 0 to 60 seconds using a CVAR within the config file.

    Could this possibly be added to this plugin?

    Sunyata

    Last edited by Sunyata; 07-19-2020 at 05:37.
    Sunyata is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 07-19-2020 , 05:20   Re: [L4D & L4D2] Lock Doors (1.2) [10-May-2020]
    Reply With Quote #10

    Oh yeah Saferoom Door Spam Protection only prevents saferoom doors. This plugin allows locking/opening any standard door iirc. I guess adapting this to allow opening specific doors wouldn't be much of a problem, the only issue is determining which doors are actually rescue rooms and if they have been opened or not. It's not something I have any interest or time to figure out and do. Sorry.
    __________________
    Silvers 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 05:24.


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