Raised This Month: $209 Target: $400
 52% 

[L4D & L4D2] Health Vending Machines (1.10) [10-Apr-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
2821
Plugin Version:
1.10
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    32 
    Plugin Description:
    Spawn vending machines which supply health when used.
    Old 02-27-2012 , 23:33   [L4D & L4D2] Health Vending Machines (1.10) [10-Apr-2021]
    Reply With Quote #1


    (1. Cooler, 2. Fountain, 3. Drinks, 4. Vendor, 5. Snacks, 6. Coffee)


    Related Plugins:

    About:
    • Gives temporary health or main health. Not above 100 HP.
    • Selection of 6 Health Vending Machines.
    • Save up to 32 Vendors for auto-spawning. Saved to l4d_vendor.cfg in your servers \addons\sourcemod\data\ folder.


    Thanks:
    • AtomicStryker, Zuko and McFlurry - For source code (credits inside).
    • alexip121093
    • disawar1
    • xioSlayer
    • [Resistance] Yoshi
    • [Resistance] Soroshi
    • januto
    • Recon-1
    • ilyaadminman
    • Herbie_06
    • JoBarfCreepy - Idea for the Coffee and Snacks vendors.
    • The 5th Survivor - Text corrections to the cvars.
    • adrianman


    Admin Commands: (requires "z" flag)

    PHP Code:
    sm_vendor         // Spawns a temporary vending machine at your crosshair. Usage: sm_vendor <1|2|3|4|5|6>.
    sm_vendorsave     // Spawns a vending machine at your crosshair and saves to config. Usage: sm_vendorsave <1|2|3|4|5|6>.
    sm_vendordel      // Removes the vending machine your crosshair is pointing at and deletes from the config if saved.
    sm_vendorwipe     // Removes all vendors from the current map and deletes them from the config.
    sm_vendorglow     // Toggle to enable glow on all vendors to see where they are placed.
    sm_vendorlist     // Display a list vending machine positions and the total number of.
    sm_vendorang      // Displays a menu to adjust the vendor angles your crosshair is over.
    sm_vendorpos      // Displays a menu to adjust the vendor origin your crosshair is over. 


    Cvars:

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

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

    // (L4D2 only). 0=Off. Any other value is the range at which the glow will turn on.
    l4d_vendor_glow "100"

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

    // The health given to players when using the Coffee Machines (6).
    l4d_vendor_health_coffee "5"

    // The health given to players when using the Water Coolers (1).
    l4d_vendor_health_cooler "2"

    // The health given to players when using the Small Drink vendor (3).
    l4d_vendor_health_drinks "5"

    // The health given to players when using the Water Fountains (2).
    l4d_vendor_health_fountain "2"

    // The health given to players when using the Snack Vendors (5).
    l4d_vendor_health_snacks "5"

    // The health given to players when using the Drink Vendors (4).
    l4d_vendor_health_vendor "5"

    // 0=Infinite. Maximum number of times a Coffee Machine can be used.
    l4d_vendor_max_coffee "10"

    // 0=Infinite. Maximum number of times a Water Cooler can be used.
    l4d_vendor_max_cooler "15"

    // 0=Infinite. Maximum number of times a Small Drink vendor can be used.
    l4d_vendor_max_drinks "10"

    // 0=Infinite. Maximum number of times a Water Fountain can be used.
    l4d_vendor_max_fountain "15"

    // 0=Infinite. Maximum number of times a Snack vendor can be used.
    l4d_vendor_max_snacks "10"

    // 0=Infinite. Maximum number of times a Drink vendor can be used.
    l4d_vendor_max_vendor "10"

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

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

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

    // -1=All, 0=None. Otherwise randomly select this many vendors to spawn from the maps confg.
    l4d_vendor_random "-1"

    // 0=Add to normal health. -1=Add temporary health. Values between 1 and 100 create a chance to give health.
    l4d_vendor_temp "25"

    // How many seconds it takes to use a vending machine.
    l4d_vendor_timed "1.0"

    // Vending Machine plugin version.
    l4d_vendor_version 


    Changes:
    Code:
    1.10 (10-Apr-2021)
        - Increased the interaction range of Vending Machines. This allows positioning over a maps vendors. Thanks to "Shao" for reporting.
    
    1.9 (30-Sep-2020)
        - Fixed compile errors on SM 1.11.
    
    1.8 (10-May-2020)
        - Extra checks to prevent "IsAllowedGameMode" throwing errors.
        - Various changes to tidy up code.
        - Various optimizations and fixes.
    
    1.7 (01-Apr-2020)
        - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
    
    1.6 (05-May-2018)
        - Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
        - Changed cvar "l4d_vendor_modes_tog" now supports L4D1.
    
    1.5 (25-Aug-2013)
        - Fixed the plugin crashing or not working on some maps.
    
    1.4 (21-Jul-2013)
        - Removed Sort_Random work-around. This was fixed in SourceMod 1.4.7, all should update or spawning issues will occur.
    
    1.3 (01-Jul-2012)
        - Fixed healing players above 100 HP - Thanks to "adrianman" for reporting.
    
    1.2 (01-Jun-2012)
        - Added cvar "l4d_vendor_glow_color" to set the glow color, L4D2 only.
        - Text corrections to the cvars - Thanks to "The 5th Survivor".
        - Restricted command "sm_vendorglow" to L4D2 only.
        - Restricted cvar "l4d_vendor_glow" to L4D2 only.
    
    1.1 (10-May-2012)
        - Added 2 new models, Coffee and Snacks - Thanks to "JoBarfCreepy".
        - Added 4 new cvars for the above addition.
        - Added cvar "l4d_vendor_modes_off" to control which game modes the plugin works in.
        - Added cvar "l4d_vendor_modes_tog" same as above, but only works for L4D2.
        - Changed cvar "l4d_vendor_modes" to enable the plugin on specified modes.
        - Removed max entity check and related error logging.
    
    1.0 (28-Feb-2012)
        - Initial release.


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

    Updating from 1.1 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_vendor.sp - 217 views - 48.9 KB)
    __________________

    Last edited by Silvers; 04-10-2021 at 13:15.
    Silvers is offline
    bubbabyte
    Member
    Join Date: Jun 2010
    Old 02-27-2012 , 23:37   Re: [L4D & L4D2] Health Vending Machines (1.0) [28-Feb-2012]
    Reply With Quote #2

    awesome job as always man!
    bubbabyte is offline
    JoBarfCreepy
    Member
    Join Date: Feb 2011
    Location: Next to Sweden and Norwa
    Old 02-28-2012 , 15:57   Re: [L4D & L4D2] Health Vending Machines (1.0) [28-Feb-2012]
    Reply With Quote #3

    Ya' know, I used to pretend they worked like that back in '08
    JoBarfCreepy is offline
    AtomicStryker
    Veteran Member
    Join Date: Apr 2009
    Location: Teutonia!!
    Old 02-29-2012 , 09:23   Re: [L4D & L4D2] Health Vending Machines (1.0) [28-Feb-2012]
    Reply With Quote #4

    does sm_vendordel also delete it from the config
    AtomicStryker is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 02-29-2012 , 09:26   Re: [L4D & L4D2] Health Vending Machines (1.0) [28-Feb-2012]
    Reply With Quote #5

    Yeah, forgot to add that to the description.
    __________________
    Silvers is offline
    Hunter Killer
    Junior Member
    Join Date: Jan 2012
    Location: Front of my computer
    Old 03-01-2012 , 03:05   Re: [L4D & L4D2] Health Vending Machines (1.0) [28-Feb-2012]
    Reply With Quote #6

    Another great plugin. Thanks Silvers..
    Hunter Killer is offline
    Send a message via Skype™ to Hunter Killer
    Dont Fear The Reaper
    Member
    Join Date: Nov 2011
    Old 03-06-2012 , 13:17   Re: [L4D & L4D2] Health Vending Machines (1.0) [28-Feb-2012]
    Reply With Quote #7

    Nice idea

    Just one thing, could you add an option to replace all already existing vending machines with ones that can heal, so you don't have to create extra spawns?
    Would be nice because there are already vending machines on many places in the maps which are suitable.
    Dont Fear The Reaper is offline
    alexip121093
    Senior Member
    Join Date: Dec 2009
    Location: Hong Kong
    Old 03-06-2012 , 13:43   Re: [L4D & L4D2] Health Vending Machines (1.0) [28-Feb-2012]
    Reply With Quote #8

    Quote:
    Originally Posted by Dont Fear The Reaper View Post
    Nice idea

    Just one thing, could you add an option to replace all already existing vending machines with ones that can heal, so you don't have to create extra spawns?
    Would be nice because there are already vending machines on many places in the maps which are suitable.
    It is impossible to do that because those existing vending machines are prop_static
    __________________
    alexip121093 is offline
    Send a message via MSN to alexip121093
    Dont Fear The Reaper
    Member
    Join Date: Nov 2011
    Old 03-06-2012 , 14:01   Re: [L4D & L4D2] Health Vending Machines (1.0) [28-Feb-2012]
    Reply With Quote #9

    Ah ok, too bad

    Thanks for the quick reply though
    Dont Fear The Reaper is offline
    Marcus101RR
    Veteran Member
    Join Date: Aug 2009
    Location: Tampa, FL
    Old 03-06-2012 , 17:23   Re: [L4D & L4D2] Health Vending Machines (1.0) [28-Feb-2012]
    Reply With Quote #10

    Quote:
    Originally Posted by JoBarfCreepy View Post
    Ya' know, I used to pretend they worked like that back in '08
    Now I feel its like Grand Theft Auto 4, grab a soda and boom 100 Health. haha
    __________________
    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 19:34.


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