alasfourom |
12-26-2022 03:15 |
[L4D2] Door Lock With Ready Up Mode - v2.5 | May 22, 2024
1 Attachment(s)
About:- The plugin will block saferoom doors (lock saferoom doors / freeze or teleport players back in first chapters)
- Players will not be able to leave the safe area until all players are loaded and are ready
- You can adjust the time to wait for loaders, the time to unlock the safe area and the time to wait for unready players
- You can set a percentage for example if more than 75% by default are ready, safe area will unlock
- You can customize doors lock/unlock through cvar
Description:- This plugin enhances game control by managing saferoom door access. It locks saferoom doors and can freeze or teleport players back to the start of chapters, ensuring no player leaves the safe area prematurely. The plugin waits until all players are loaded and ready before unlocking the doors.
Thanks:- Silvers: For Reviewing and General Fixes.
- HarryPotter: For the lockdown plugin.
- Official Instruction: For multiple tests and reports.
- apples1949: For adding simplified Chinese translation.
Image:
https://i.ibb.co/pPMCv3X/Untitled.png
Video:
Commands:- sm_lock - Admin command to manually lock saferoom doors.
- sm_unlock - Admin command to manually unlock saferoom doors.
- sm_ready - Player command to mark readiness in ReadyUp mode.
- sm_unready - Player command to revoke readiness in ReadyUp mode.
Cvars:- A file named "l4d2_door_lock.cfg" will be created in "\cfg\sourcemod" folder.
PHP Code:
// This file was auto-generated by SourceMod (v1.11.0.6911)
// ConVars for plugin "l4d2_door_lock.smx"
// Enable L4D2 Door Lock Plugin
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_doorlock_plugin_enable "1"
// Turn On Door Lock In These Game Modes, Separate By Commas (No Spaces, Empty = All).
// -
// Default: "versus,coop"
l4d2_doorlock_game_mode "versus,coop"
// Set First Chapters Mode (0 = Freeze Survivors, 1 = Teleport Survivors)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_doorlock_first_scenario_mode "1"
// Enable Ready/Unready Feature.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_doorlock_enable_ready_mode "1"
// Display Chat Texts When A Team Is Ready
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_doorlock_readyup_notify "1"
// Display Chat Texts To Leavers When Teleported (0 = Disable, 1 = Chat, 2 = Central Text)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_doorlock_leavers_notify"1"
// Set Cheats While Safe Area Locked (0 = No Cheats, 1 = No DMG, 2 = Infine Ammo, 3 = Both)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d2_doorlock_add_cheats "1"
// How Long You Want To Set The Countdown To Unlock The Safe Area (In Seconds)
// -
// Default: "10"
l4d2_doorlock_countdown "10"
// How Long Plugin Waits For Loaders Before Giving Up On Them (In Seconds)
// -
// Default: "30"
l4d2_doorlock_loaders_time "30"
// How Long Plugin Waits For Unready Teams Before Giving Up On Them (In Seconds)
// -
// Default: "120"
l4d2_doorlock_readyup_time "120"
// Set The Minimum Percentage Required For A Ready Team To Start The Round
// -
// Default: "75.0"
l4d2_doorlock_readyup_percent "75.0"
// Set How Many Times Players Are Allowed To Use Unready Per Round.
// -
// Default: "2"
l4d2_doorlock_unready_counts "2"
// Set A Glow For The Saferoom Doors
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_doorlock_glow_enable "1"
// Set The Glow Range For Saferoom Doors
// -
// Default: "500"
l4d2_doorlock_glow_range "500"
// Set Saferoom Lock Glow Color, (0-255) Separated By Spaces.
// -
// Default: "255 0 0"
l4d2_doorlock_lock_glow_color "255 0 0"
// Set Saferoom Unlock Glow Color, (0-255) Separated By Spaces.
// -
// Default: "0 255 0"
l4d2_doorlock_unlock_glow_color "0 255 0"
// Display Hint Texts To Connected Players Notiying Them That Loaders Are Connecting (0 = Disable, 1 = Enable)
// -
// Default: "0"
l4d2_doorlock_loaders_message "0"
// If You Playing With Extra Bots, Specifiy Maxium Teams Count (Survivors + Infected), Otherwise Leave It '0'
// -
// Default: "0"
l4d2_doorlock_loaders_extraplayers "0"
Requirements:
Installation:- Make sure you have first installed left4dhooks and colors.
- Extract the files inside "l4d2_door_lock.zip" in your "\addons\sourcemod" folder.
Updates:
Code:
- 22-05-2024 > Version 2.5: Fixing some logs related to time handle, eliminate cheat flags during healing, and fix client index 0 issues in commands.
- 16-06-2023 > Version 2.4: Some optimizations thanks to Silvers + Fixing issue where you have +8 players thanks to tiphong for reporting.
- 11-06-2023 > Version 2.3: Removed auto heal on exiting saferoom, removed l4d2_doorlock_add_commands cvar, instead detecting now any command and added a cvar to enable loaders connecting message.
- 26-02-2023 > Version 2.2: Added new cvar to prevent some commands from interfering with readup panel, and fix panel not closing after readyup time is over.
- 25-02-2023 > Version 2.1: Remove repeated timer to display menu, added color support and fixes a bug where sometimes survivors doesn't get full hp when teleported.
- 27-01-2023 > Version 2.0: Fixed a bug, doors close when players are connecting and survivros already left safe area - Thanks to official instruction.
- 22-01-2023 > Version 1.9: Adding a warning cvar when players leave safe area while players are not ready - Thanks to official instruction.
- 19-01-2023 > Version 1.8: Adding a different method to ready up in first chapters using teleport
- 18-01-2023 > Version 1.7: Adding translation.
- 15-01-2023 > Version 1.6: Some improvements, changing method to detect gamemode, and adding a new cvar.
- 04-01-2023 > Version 1.5: Adding a mechanism to unlock safe area if admin got disconnected while controlling door lock.
- 03-01-2023 > Version 1.4: General enhancements and bug fixed.
- 31-12-2022 > Version 1.3: Connect and disconnect bug fixed - Thanks to Official Instruction.
- 31-12-2022 > Version 1.2: Now both teams need to be ready to start the round, video added
- 27-12-2022 > Version 1.1: General fixes and enhancements - Thanks to Silvers
- 26-12-2022 > Version 1.0: Initial release
|