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

[L4D & L4D2] Respawn Rescue Closet (1.11) [24-Dec-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
3833
Plugin Version:
1.11
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    25 
    Plugin Description:
    Creates a rescue closet to respawn dead players, these can be temporary or saved for auto-spawning.
    Old 08-10-2013 , 06:07   [L4D & L4D2] Respawn Rescue Closet (1.11) [24-Dec-2022]
    Reply With Quote #1



    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:
    1. Spawn with sm_closet_save 2 command.
    2. 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.
    3. The closet will spawn with a model that can be used to set the position and angle. Don't forget to save.
    4. The next time this closet spawns it will be invisible. You can use sm_closet_reload command to reload config and hide model.
    5. 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.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_closet.sp - 544 views - 57.2 KB)
    __________________

    Last edited by Silvers; 12-24-2022 at 20:04.
    Silvers is offline
    chatyak
    Senior Member
    Join Date: Aug 2011
    Old 08-10-2013 , 13:43   Re: [L4D & L4D2] Respawn Rescue Closet [10-Aug-2013]
    Reply With Quote #2

    lol - what a perfect rescue closet. Funny.
    chatyak is offline
    Deathrow Bo Dean
    Senior Member
    Join Date: Sep 2010
    Old 09-06-2013 , 17:46   Re: [L4D & L4D2] Respawn Rescue Closet (1.0) [10-Aug-2013]
    Reply With Quote #3

    I will give it a try tonight..DBD

    P.S. A little diescription on how to use the plugin would be very helpful. Does the Admin have to set up the closet in the game? Or, will it do it without an Admin?

    Last edited by Deathrow Bo Dean; 09-06-2013 at 18:06.
    Deathrow Bo Dean is offline
    Deathrow Bo Dean
    Senior Member
    Join Date: Sep 2010
    Old 09-07-2013 , 00:50   Re: [L4D & L4D2] Respawn Rescue Closet (1.0) [10-Aug-2013]
    Reply With Quote #4

    Just tried it on my L4d serve. Using the AR15, I entered !sm_closet while pointing the crosshair to the location i wanted to spawn the closet and hit the enter key..... All I spawned was 2 ORANGE ERRORs..????
    Deathrow Bo Dean is offline
    Deathrow Bo Dean
    Senior Member
    Join Date: Sep 2010
    Old 09-12-2013 , 02:06   Re: [L4D & L4D2] Respawn Rescue Closet (1.0) [10-Aug-2013]
    Reply With Quote #5

    09/11/2013 10:56 pm pst. I did not notice that this mod is also for L4D2 so I tried it toniught and played on 2 maps. Consert and Atrium. Using the command !sm _closet it spawned the closet on both maps. However, I did not see anyone waiting to be let out. Every time I got killed I respawned like I always do. Maybe there may be some sort of conflict with 2 respawn plugins? I will give it another try tomorrow. I did not have such luck with L4d. Sorry I did not notice that Your mod was for both games. DBD
    Deathrow Bo Dean is offline
    RavenDan29
    Veteran Member
    Join Date: Sep 2009
    Old 10-20-2013 , 12:11   Re: [L4D & L4D2] Respawn Rescue Closet (1.0) [10-Aug-2013]
    Reply With Quote #6

    Quote:
    Originally Posted by Deathrow Bo Dean View Post
    09/11/2013 10:56 pm pst. I did not notice that this mod is also for L4D2 so I tried it toniught and played on 2 maps. Consert and Atrium. Using the command !sm _closet it spawned the closet on both maps. However, I did not see anyone waiting to be let out. Every time I got killed I respawned like I always do. Maybe there may be some sort of conflict with 2 respawn plugins? I will give it another try tomorrow. I did not have such luck with L4d. Sorry I did not notice that Your mod was for both games. DBD
    rescue closets don't work during finales the only work b4 you start the event trigger

    can I use the rescue closets as area barriers during versus gameplay without survivors respawning in them?
    __________________
    RavenDan29 is offline
    caxanga334
    Member
    Join Date: Nov 2013
    Location: Brazil
    Old 11-27-2013 , 18:51   Re: [L4D & L4D2] Respawn Rescue Closet (1.0) [10-Aug-2013]
    Reply With Quote #7

    When a survivor respawn on the rescue closet, the survivor is stuck. ( I saw some people teleporting from it by shoting but I don't know how to do this teleport, I use a unstuck plugin to get out of it )
    caxanga334 is offline
    silentkiller101
    Junior Member
    Join Date: May 2014
    Old 09-12-2014 , 00:08   Re: [L4D & L4D2] Respawn Rescue Closet (1.0) [10-Aug-2013]
    Reply With Quote #8

    doesn't work on L4D1, just get 2 red errors..
    silentkiller101 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 06-14-2015 , 18:10   Re: [L4D2] Respawn Rescue Closet (1.1) [14-Jun-2015]
    Reply With Quote #9

    Quote:
    Originally Posted by RavenDan29 View Post
    can I use the rescue closets as area barriers during versus gameplay without survivors respawning in them?
    They will probably respawn in them.

    Quote:
    Originally Posted by caxanga334 View Post
    When a survivor respawn on the rescue closet, the survivor is stuck. ( I saw some people teleporting from it by shoting but I don't know how to do this teleport, I use a unstuck plugin to get out of it )
    Yeah they seem to get stuck sometimes, can't really do anything about this.

    Quote:
    Originally Posted by Deathrow Bo Dean View Post
    Just tried it on my L4d serve. Using the AR15, I entered !sm_closet while pointing the crosshair to the location i wanted to spawn the closet and hit the enter key..... All I spawned was 2 ORANGE ERRORs..????
    Quote:
    Originally Posted by silentkiller101 View Post
    doesn't work on L4D1, just get 2 red errors..
    Not sure why I thought this worked in L4D. There is no outhouse model for the rescue closet so unless someone can recommend one I have made it only support L4D2. Sorry.
    __________________

    Last edited by Silvers; 06-14-2015 at 18:10.
    Silvers is offline
    Accelerator
    Senior Member
    Join Date: Dec 2010
    Location: Russia
    Old 08-26-2015 , 04:47   Re: [L4D2] Respawn Rescue Closet (1.1) [14-Jun-2015]
    Reply With Quote #10

    Should be precaching the following models, in order to avoid messages on the console:
    Code:
    Late precache of models/props_urban/outhouse_door001_dm01_01.mdl
    Late precache of models/props_urban/outhouse_door001_dm02_01.mdl
    Late precache of models/props_urban/outhouse_door001_dm03_01.mdl
    Fix:
    Code:
    public OnMapStart()
    {
    	PrecacheModel(MODEL_PROP);
    	PrecacheModel(MODEL_DOOR);
    	PrecacheModel("models/props_urban/outhouse_door001_dm01_01.mdl");
    	PrecacheModel("models/props_urban/outhouse_door001_dm02_01.mdl");
    	PrecacheModel("models/props_urban/outhouse_door001_dm03_01.mdl");
    }
    Accelerator is online now
    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 02:57.


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