About:- Create up to 32 a rescue closet to respawn dead players, these can be temporary or saved for auto-spawning
- This will not allow players to respawn in Versus gamemodes.
- After the finale event is triggered players will not respawn, this is the games default behaviour.
- The direction of glowing players waiting to be respawned is sometimes wrong.
- Rotating or changing the origin of the closet will break the door and probably the respawn. You should only do this on saved closets. When you are happy with the position save it and use the sm_closet_reload command to reset the plugin so the closet works correctly.
Invisible Closet - No Model:- Spawn with sm_closet_save 2 command.
- You can save inside a room with door or in the open, survivors will appear when not in line-of-sight, and spawn when visible.
- The closet will spawn with a model that can be used to set the position and angle. Don't forget to save.
- The next time this closet spawns it will be invisible. You can use sm_closet_reload command to reload config and hide model.
- Use sm_closet_list and sm_closet_tele commands to teleport and delete/replace invisible models if required.
Thanks:- Herbie
- Sev
- disawar1
- gilmon
- chatyak
- worminater
- Figa - Gun Cabinet model coding.
- Shadowysn - Invisible model idea.
- BlackSabbarh - Testing allow respawn on any map.
- replay_84 - Lots of help testing version 1.9 and 1.10
Admin Commands: (requires "z" flag)
PHP Code:
sm_closet // Spawns a temporary Rescue Closet at your crosshair. <Model: 0=Toilet, 1=Gun Cabinet. 2=Invisible model.>
sm_closet_save // Spawns a Rescue Closet at your crosshair and saves to config. <Model: 0=Toilet, 1=Gun Cabinet. 2=Invisible model.>
sm_closet_del // Removes the Rescue Closet you are pointing at and deletes from the config if saved. Must be near-by to delete invisible closets.
sm_closet_clear // Removes all Rescue Closets spawned by this plugin from the current map.
sm_closet_wipe // Removes all Rescue Closets from the current map and deletes them from the config.
sm_closet_reload // Removes all Rescue Closets and reloads the data config.
sm_closet_glow // Toggle to enable glow on all Rescue Closets to see where they are placed. Does not edit invisible ones.
sm_closet_list // Display a list Rescue Closet positions and the total number of.
sm_closet_tele // Teleport to a Rescue Closet (Usage: sm_closet_tele <index: 1 to MAX_SPAWNS (32)>).
sm_closet_pos // Displays a menu to adjust the Rescue Closet origin your crosshair is over. Does not edit invisible ones.
CVars:
Saved to
l4d_closet.cfg in your servers
\left4dead\cfg\sourcemod\ folder.
PHP Code:
// 0=Plugin off, 1=Plugin on.
l4d_closet_allow "1"
// (L4D2 only). 0=Off. 1=Force allow players to respawn in closets on any map via VScript director settings.
l4d_closet_force "1"
// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d_closet_modes ""
// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d_closet_modes_off ""
// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d_closet_modes_tog "0"
// -1=All, 0=None. Otherwise randomly select this many Rescue Closets to spawn from the maps config.
l4d_closet_random "-1"
// 0=Infinite. Number of times to allow a closet to respawn players.
l4d_closet_respawn "0"
// Respawn Rescue Closet plugin version.
l4d_closet_version
Changes:
Code:
1.11 (24-Dec-2022)
- Fixed any potential invalid timer errors that were bound to happen with the previous version.
1.10 (24-Dec-2022)
- Fixed the rescue models becoming non-solid when simply opening the door and not rescuing someone. Thanks to "replay_84" for reporting.
- Using a backup event to set the respawn count, if the "survivor_rescued" event does not trigger.
- Increased how far players must be from the rescue model to make it solid again.
1.9 (21-Dec-2022)
- Closets will become non-solid when someone is rescued, until players are no longer nearby.
- Doors will automatically close when a player is not nearby and the rescue entity will respawn if allowed.
- Raised the rescue entity slightly to prevent players falling through the world. Thanks to "replay_84" for reporting.
- Changed command "sm_closet_pos" to allow targeting any/invisible closets within 100 units distance. Requested by "replay_84".
- Fixed command "sm_closet_list" not showing the correct type as relative to the "sm_closet" command.
- Invisible types will delete the temporary model after 30 seconds.
- Thanks to "replay_84" for lots of help testing.
1.8 (15-Jan-2022)
- Fixed cvar "l4d_closet_respawn" not allowing a single closet to respawn multiple times. Thanks to "maclarens" for reporting.
- This will close the doors and re-create the rescue entity after 9 seconds. Players may get stuck if they don't move out before.
- Bots usually auto teleport if stuck.
- Should be able to close the door manually to allow more rescues, after to the cvar limit.
1.7 (15-Feb-2021)
- Fixed "Invalid game event handle". Thanks to "maclarens" for reporting.
1.6 (10-May-2020)
- Extra checks to prevent "IsAllowedGameMode" throwing errors.
- Various changes to tidy up code.
1.5 (01-Apr-2020)
- Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
1.4 (24-Nov-2019)
- Fixes for the outhouse closet type:
- Changed angles of players inside the box to face the correct way.
- Changed origin of players spawning to prevent getting stuck inside the model.
1.3 (23-Oct-2019)
- Added cvar "l4d_closet_force" to force allow respawning in closets on any map.
- This cvar only works in L4D2. This should allow respawning on maps that disabled the possibility.
1.2 (03-Jun-2019)
- Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
- Added support again for L4D1.
- Added option to use Gun Cabinet model - Thanks to "Figa" for coding it in.
- Added option to use invisible model - Thanks to "Shadowysn" for suggesting.
- Changed cvar "l4d_closet_modes_tog" now supports L4D1.
- Fixed PreCache errors - Thanks to "Accelerator74" for reporting.
1.1 (14-Jun-2015)
- Changed to only support L4D2 because L4D does not have the rescue closet model.
1.0 (10-Aug-2013)
- Initial release.
Installation:- Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
Updating from 1.2 or older:- New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.