Monthly Target: $400 Donations: $348
 87% 

[L4D & L4D2] Health Cabinet (1.6) [18-Jul-2013]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
Veteran Member
Join Date: Aug 2010
Location: Space
Plugin ID:
2747
Plugin Version:
1.6
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Approver:
    Plugin Description:
    Auto-Spawns Health Cabinets.
    Servers with this Plugin:
     
    Old 12-30-2011 , 22:04   [L4D & L4D2] Health Cabinet (1.6) [18-Jul-2013]
    Reply With Quote #1

    • Auto-spawns saved Health Cabinets with first aid kits, defibrillators, adrenaline, pain pills.
    • The auto-spawn data config is saved to l4d_cabinet.cfg in your servers \addons\sourcemod\data\ folder.


    Thanks:

    Admin Commands: (requires "z" flag)
    PHP Code:
    sm_cabinet        // Spawns a temporary Health Cabinet at your crosshair.
    sm_cabinetsave    // Spawns a Health Cabinet at your crosshair and saves to config. Usage: sm_cabinetsave <first> <pills> <adren> <defib>.
    sm_cabinetlist    // Displays a list of Health Cabinets spawned by the plugin and their locations.
    sm_cabinetglow    // (L4D2 only). Toggle to enable glow on all cabinets to see where they are placed.
    sm_cabinettele    // Teleport to a cabinet (Usage: sm_cabinettele <index: 1 to MAX_CABINETS>).
    sm_cabinetdel     // Removes the Health Cabinet you are aiming at and deletes from the config if saved.
    sm_cabinetclear   // Removes all Health Cabinets from the current map.
    sm_cabinetwipe    // Removes all Health Cabinets from the current map and deletes them from the config.
    sm_cabinetang     // Displays a menu to adjust the cabinet angles your crosshair is over.
    sm_cabinetpos     // Displays a menu to adjust the cabinet origin your crosshair is over.

    // Examples for: sm_cabinet and sm_cabinetsave:
    // Usage: sm_cabinetsave <first aid> <pills> <adrenaline> <defibrillators>.
    // Value: -1=Cvar default, 0=No chance, 100=Best chance.
    sm_cabinet -1 100         // Pills have 100% chance spawning, the rest use the cvar defaults: l4d_cabinet_spawn_*
    sm_cabinet 50 100 100 0   // Spawns mostly pills, adrenaline, some first aid and no defibrillators.
    sm_cabinet 0 0 0 100      // Does not spawn anything except defibrillators.
    sm_cabinet 1 1 1 1        // Everything has an equal chance of spawning, but spawning is random so you won't get 1 of each item. 


    CVars:

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

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

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

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

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

    // (L4D2 only). 0=Off. Range the cabinet glows.
    l4d_cabinet_glow "150"

    // (L4D2 only). 0=Default glow color. Three values between 0-255 separated by spaces. RGB Color255 - Red Green Blue.
    l4d_cabinet_glow_color "255 0 0"

    // Maximum number of items.
    l4d_cabinet_max "4"

    // Minimum number of items.
    l4d_cabinet_min "0"

    // -1=All, 0=Off, other value randomly spawns that many from the config.
    l4d_cabinet_random "2"

    // Chance out of 100 to spawn adrenaline.
    l4d_cabinet_spawn_adren "80"

    // Chance out of 100 to spawn defibrillators.
    l4d_cabinet_spawn_defib "10"

    // Chance out of 100 to spawn first aid kits.
    l4d_cabinet_spawn_first "30"

    // Chance out of 100 to spawn pain pills.
    l4d_cabinet_spawn_pills "100"

    // Health Cabinet plugin version.
    l4d_cabinet_version 


    Changes:
    Code:
    1.6 (18-Jul-2013)
        - Fixed spawning issues.
    
    1.5.1 (05-Jun-2012)
        - Fixed print to chat error from the command "sm_cabinetglow".
    
    1.5.0 (01-Jun-2012)
        - Added cvar "l4d_cabinet_glow_color" to set the glow color, L4D2 only.
        - Fixed bugs with deleting Cabinets.
        - Prevention for empty Cabinets, now spawns 1 second after opening when bugged.
        - Versus games now spawn the same cabinets and items for both teams - Requested by "Dont Fear The Reaper"
    
    1.4 (10-May-2012)
        - Added command "sm_cabinetglow" to see where cabinets are placed.
        - Added command "sm_cabinettele" to teleport to a cabinet.
        - Added command "sm_cabinetang" to change the cabinet angle.
        - Added command "sm_cabinetpos" to change the cabinet origin.
        - Fixed a bug causing errors when deleting cabinets.
    
    1.3 (03-Mar-2012)
        - Added command "sm_cabinetglow" to see where cabinets are placed.
        - Added command "sm_cabinettele" to teleport to a cabinet.
        - Added cvar "l4d_cabinet_spawn_adren" to set the chance of spawning adrenaline.
        - Added cvar "l4d_cabinet_spawn_defib" to set the chance of spawning defibrillators.
        - Added cvar "l4d_cabinet_spawn_first" to set the chance of spawning first aid kits.
        - Added cvar "l4d_cabinet_spawn_pills" to set the chance of spawning pain pills.
        - Changed command "sm_cabinet" and "sm_cabinetsave" usage: sm_cabinetsave <first> <pills> <adren> <defib>.
        - Changed default values of some cvars.
        - Changed the data config format. Please use the "sm_silvercfg" plugin to convert reformat the config.
        - Removed cvar "l4d_cabinet_type"
        - Removed cvar "l4d_cabinet_type1"
        - Removed cvar "l4d_cabinet_type2"
    
    1.2 (02-Jan-2012)
        - Temporary update:
        - Fixed bots auto-grabbing items from closed cabinets.
        - Added cvar "l4d_cabinet_type1".
        - Added cvar "l4d_cabinet_type2".
        - Changed command "sm_cabinet" and "sm_cabinetsave" usage.
    
    1.1 (31-Dec-2011)
        - Removed useless code.
    
    1.0 (31-Dec-2011)
        - Initial Release.


    Installation:
    • Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.

    Updating from 1.4 or older:
    • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.

    Updating from 1.2 or older:
    If you saved cabinets, the old config cannot be read. Use the sm_silvercfg plugin to reformat the config.
    The old data config is saved as l4d_cabinet.old.cfg in your servers \addons\sourcemod\data\ folder.
    1. Install the sm_silvercfg plugin.
    2. Run the command sm_silvercfg.
    3. Delete the plugin.
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_silvercfg.sp - 1489 views - 3.2 KB)
    File Type: sp Get Plugin or Get Source (l4d_cabinet.sp - 899 views - 43.5 KB)
    __________________

    Last edited by Silvers; 07-18-2013 at 05:31.
    Silvers is offline
    Marcus101RR
    Veteran Member
    Join Date: Aug 2009
    Location: Florida, Tampa
    Old 12-30-2011 , 22:31   Re: [L4D & L4D2] Health Cabinet (1.0) [31-Dec-2011]
    Reply With Quote #2

    Testing...

    Will report back to see if this is a good plugin.

    EDIT: Works great, too bad the bots can take the stuff out of the box before its even open.

    Last edited by Marcus101RR; 12-31-2011 at 01:05.
    Marcus101RR is offline
    Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
    Silvers
    Veteran Member
    Join Date: Aug 2010
    Location: Space
    Old 12-31-2011 , 02:43   Re: [L4D & L4D2] Health Cabinet (1.1) [31-Dec-2011]
    Reply With Quote #3

    Hmm I hadn't noticed that. I'll have a play about, it probably needs a different solid type. I know Gear Transfer does this so I'll look into a fix.
    __________________
    Silvers is offline
    McFlurry
    Veteran Member
    Join Date: Mar 2010
    Location: RemoveEdict(0);
    Old 12-31-2011 , 15:06   Re: [L4D & L4D2] Health Cabinet (1.1) [31-Dec-2011]
    Reply With Quote #4

    Why not add defib support as well?
    __________________
    McFlurry is offline
    Send a message via Skype™ to McFlurry
    Marcus101RR
    Veteran Member
    Join Date: Aug 2009
    Location: Florida, Tampa
    Old 12-31-2011 , 20:30   Re: [L4D & L4D2] Health Cabinet (1.1) [31-Dec-2011]
    Reply With Quote #5

    Quote:
    Originally Posted by McFlurry View Post
    Why not add defib support as well?
    The cabinets in l4d only carry pills or a medkit. That is why, if you want extra item spawns, use stripper.
    Marcus101RR is offline
    Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
    Silvers
    Veteran Member
    Join Date: Aug 2010
    Location: Space
    Old 01-01-2012 , 06:50   Re: [L4D & L4D2] Health Cabinet (1.1) [31-Dec-2011]
    Reply With Quote #6

    Update:See first thread.

    Good idea thanks MCFlurry. Also now spawns items when the Cabinet is opened, no longer will the bots grab before
    __________________

    Last edited by Silvers; 03-03-2012 at 05:52.
    Silvers is offline
    hg0827
    Junior Member
    Join Date: Nov 2010
    Old 01-06-2012 , 21:11   Re: [L4D & L4D2] Health Cabinet (1.1) [31-Dec-2011]
    Reply With Quote #7

    can make plugin for Auto spawns ammo pit ?
    hg0827 is offline
    MasterMind420
    Senior Member
    Join Date: Nov 2010
    Old 01-07-2012 , 05:14   Re: [L4D & L4D2] Health Cabinet (1.1) [31-Dec-2011]
    Reply With Quote #8

    I'm sure he could setup a plugin to auto spawn almost anything, depending on the limitations, as to what your spawning.
    MasterMind420 is offline
    Marcus101RR
    Veteran Member
    Join Date: Aug 2009
    Location: Florida, Tampa
    Old 01-07-2012 , 16:12   Re: [L4D & L4D2] Health Cabinet (1.1) [31-Dec-2011]
    Reply With Quote #9

    Quote:
    Originally Posted by Silvers View Post
    Update: I am placing this here for now...


    Good idea thanks MCFlurry. Also now spawns items when the Cabinet is opened, no longer will the bots grab before


    Changed cvar:
    "l4d_cabinet_type" - Chance out of 100 to spawn pills/adrenaline, remainder to spawn first aid kits/defibrillators.

    Added 2 new cvars:
    "l4d_cabinet_type1" - Chance out of 100 to select pills, remainder to select adrenaline.
    "l4d_cabinet_type2" - Chance out of 100 to select first aid kits, remainder to select defibrillators.

    You can specify what spawns. The type arguments below is exactly what the type cvars do. This is also applied to sm_cabinetsave (which is then saved to the data config for auto-spawning).

    PHP Code:
    sm_cabinet <type> <type1> <type2>

    // Example: 
    sm_cabinet 100 100    // Spawns only pills
    sm_cabinet 100 1      // Spawns only adrenaline
    sm_cabinet 50 1 1     // Spawns either adrenaline or defibrillators
    sm_cabinet 50 100 100 // Spawns either pills or first aid kits
    sm_cabinet 50 50 100  // Spawns either pills, adrenaline or first aid kits 
    Sorry if this is confusing, I don't know a better way to do this or explain.
    very confusing to be honest. would be better if you could make it a bit more easier...

    sm_cabinetsave <medkits> <pills> <adrenaline> <defib>

    0 = Never spawns
    1 = Spawns

    Considering the last plugin had a variable that controlled the percent...you could also do:

    0 = Never/Zero Spawns
    1 = 1 of Item Spawns
    2 = 2 of Item Spawns
    3 = 3 of Item Spawns
    4 = 4 of Item Spawns

    Example:
    sm_cabinetsave <medkits> <pills> <adrenaline> <defib>
    sm_cabinetsave 2 0 1 1

    This cabinet spawns 2 Medkits, 0 pills, 1 adrenaline, and 1 debif always.
    Marcus101RR is offline
    Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
    Marcus101RR
    Veteran Member
    Join Date: Aug 2009
    Location: Florida, Tampa
    Old 01-07-2012 , 22:02   Re: [L4D & L4D2] Health Cabinet (1.1) [31-Dec-2011]
    Reply With Quote #10

    Spoiler


    I get 0 medkits and 0 pills...i'm going back to the old one.

    EDIT: managed to edit the sp, now pills and medkits spawn randomly as they should have.

    EDIT #2:
    NOTICE & WARNING
    The following plugin below is not the official version, nor may it incorporate the original intent of the author. The plugin fixes the issue with Pills and Medkits spawning on a 4:1 ratio thus no random amount of Medkits to pills is spawned.

    This fixes the issue and spawns randomly the amount of items based on the user's config file.

    2 Medkits, 2 Pills, vs 3 Medkits, 1 Pill.

    DO NOT DOWNLOAD THIS FILE IF YOU ARE NOT EXPERIENCING THE ISSUE BELOW:
    • Always 4 Pills or Medkits.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_health_cabinet.sp - 303 views - 27.7 KB)

    Last edited by Marcus101RR; 01-10-2012 at 19:42. Reason: Update
    Marcus101RR is offline
    Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
    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 08:43.


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