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

[L4D & L4D2] Gun Cabinet (1.8) [11-Dec-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
3820
Plugin Version:
1.8
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    61 
    Plugin Description:
    Spawns a gun cabinet with various weapons and items of your choosing.
    Old 08-08-2013 , 08:08   [L4D & L4D2] Gun Cabinet (1.8) [11-Dec-2022]
    Reply With Quote #1



    Related Plugins:

    About:
    • Provides a menu of weapon presets, for example Tier 1, Tier 2 etc.
    • This plugin comes with a data config (l4d_gun_cabinet_presets) and lists 7 presets you can customise to select which weapons spawn.
    • The presets config is required for the plugin to work. View the config for information on the settings and different weapons/items you can spawn.
    • To enable CSS weapons you must have the Weapon Unlock plugin, and set the cvar "l4d_gun_cabinet_css" to "1".
    • The entity is not fully solid, so to delete or adjust origin/angles you must either look at the side, top or center above the middle.
    • These solid points will not move when you change the origin/angles, neither will the weapons.
    • You can use the commmand sm_gun_cabinet_reload to reset the plugin, this will remove and reload all cabinets so for example if you changed the origin/angles and saved the data. Otherwise the weapons and solid box will not be aligned.
    • Do not request any features. If you don't like the plugin then make your own.


    Thanks:
    • disawar1 - Helped with code fixes.
    • chatyak - Lots of help.
    • Herbie - Lots of help.
    • worminater
    • Sev



    Admin Commands: (requires "z" flag)

    PHP Code:
    sm_gun_cabinet         // Opens a menu to spawn and save a Gun Cabinet to the data config for auto spawning.
    sm_gun_cabinet_del     // Removes the Gun Cabinet you are pointing at and deletes from the config.
    sm_gun_cabinet_clear   // Removes all Gun Cabinets from the current map.
    sm_gun_cabinet_wipe    // Removes all Gun Cabinets from the current map and deletes them from the config.
    sm_gun_cabinet_glow    // Toggle to enable glow on all Gun Cabinets to see where they are placed.
    sm_gun_cabinet_list    // Display a list of Gun Cabinet positions and the total number of.
    sm_gun_cabinet_reload  // Reloads the plugin, reads the preset data config and spawns any save Gun Cabinets.
    sm_gun_cabinet_tele    // Teleport to a Gun Cabinet (Usage: sm_gun_cabinet_tele <index: 1 to MAX_SPAWNS (5)>).
    sm_gun_cabinet_ang     // Displays a menu to adjust the Gun Cabinet angles your crosshair is over.
    sm_gun_cabinet_pos     // Displays a menu to adjust the Gun Cabinet origin your crosshair is over. 


    Cvars:

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

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

    // 0=Off, 1=Allow spawning CSS weapons when using the 'random' value in the preset config.
    l4d_gun_cabinet_css "0"

    // 0=Off, Sets the max range at which the cabinet glows.
    l4d_gun_cabinet_glow "0"

    // 0=Default glow color. Three values between 0-255 separated by spaces. RGB: Red Green Blue.
    l4d_gun_cabinet_glow_color "255 0 0"

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

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

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

    // Maximum number of primary weapons to spawn (max is 10).
    l4d_gun_cabinet_max_gun "8"

    // Maximum number of pistols to spawn (max is 4).
    l4d_gun_cabinet_max_pistol "2"

    // Maximum number of items to spawn (max is 2).
    l4d_gun_cabinet_max_item "1"

    // -1=All, 0=None. Otherwise randomly select this many Gun Cabinets to spawn from the maps config.
    l4d_gun_cabinet_random "-1"

    // Weapon Cabinet plugin version.
    l4d_gun_cabinet_version 


    Changes:
    Code:
    1.8 (11-Dec-2022)
        - Changes to fix compile warnings on SourceMod 1.11.
        - Now the solid sections are attached to the Gun Cabinet.
    
    1.7 (10-Apr-2021)
        - Fixed conflict with "ConVars Anomaly Fixer" plugin causing errors. Thanks to "Dragokas" for reporting.
    
    1.6 (21-Jun-2020)
        - Fixed Grenade Launcher and Chainsaw Ammo being reversed. Thanks to "AceTech" for fixing.
    
    1.5 (10-May-2020)
        - Blocked glow command from L4D1 which does not support glows.
        - Extra checks to prevent "IsAllowedGameMode" throwing errors.
        - Various changes to tidy up code.
    
    1.4 (01-Apr-2020)
        - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
    
    1.3 (21-Jul-2018)
        - Fixed errors in L4D1 due to glow not being supported. Thanks to "Dragokas" for reporting.
    
    1.2 (05-May-2018)
        - Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
        - Changed cvar "l4d_gun_cabinet_modes_tog" now supports L4D1.
    
    1.1 (20-Nov-2015)
        - Fixed Auto Shotgun ammo in L4D1 not filling.
    
    1.0 (08-Aug-2012)
        - Initial release.


    Installation:
    • Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
    • Download "l4d_gun_cabinet_presets.cfg" and put into your servers \addons\sourcemod\data\ folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_gun_cabinet.sp - 1363 views - 61.7 KB)
    File Type: cfg l4d_gun_cabinet_presets.cfg (4.4 KB, 7449 views)
    __________________

    Last edited by Silvers; 12-11-2022 at 04:21.
    Silvers is offline
    chatyak
    Senior Member
    Join Date: Aug 2011
    Old 08-09-2013 , 15:45   Re: [L4D & L4D2] Gun Cabinet (1.0) [08-Aug-2013]
    Reply With Quote #2

    Thank you - if you need more help testing let me know. Plugin working GREAT.
    chatyak is offline
    lightpro
    Junior Member
    Join Date: Jun 2013
    Old 08-09-2013 , 21:47   Re: [L4D & L4D2] Gun Cabinet (1.0) [08-Aug-2013]
    Reply With Quote #3

    Thank you for this awesome plugin but how to change the amount of the cabinet? Srr for my bad English
    lightpro is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-10-2013 , 00:54   Re: [L4D & L4D2] Gun Cabinet (1.0) [08-Aug-2013]
    Reply With Quote #4

    l4d_gun_cabinet_random to change how many Gun Cabinets spawn.. If you want more than 5 on 1 map (I don't recommend because it uses a lot of entities) you have to recompile the plugin changing the MAX_SPAWNS value.
    __________________
    Silvers is offline
    chatyak
    Senior Member
    Join Date: Aug 2011
    Old 08-10-2013 , 20:36   Re: [L4D & L4D2] Gun Cabinet (1.0) [08-Aug-2013]
    Reply With Quote #5

    Plugin is awesome. No errors at all after rigorous testing and this makes the gameplay much more enjoyable. With servers that have stronger infected - this is a great gameplay element for survivors.

    Thanks & highly recommended.
    chatyak is offline
    lightpro
    Junior Member
    Join Date: Jun 2013
    Old 08-10-2013 , 21:55   Re: [L4D & L4D2] Gun Cabinet (1.0) [08-Aug-2013]
    Reply With Quote #6

    Thanks dude. But at the tier 1 weapons i want the mp5 replace the hunting rifles, can you help me?
    lightpro is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-11-2013 , 04:36   Re: [L4D & L4D2] Gun Cabinet (1.0) [08-Aug-2013]
    Reply With Quote #7

    Quote:
    Originally Posted by lightpro View Post
    Thanks dude. But at the tier 1 weapons i want the mp5 replace the hunting rifles, can you help me?
    Yeah, help yourself by opening the presets config, it's all in there, not very hard.
    __________________
    Silvers is offline
    lightpro
    Junior Member
    Join Date: Jun 2013
    Old 08-11-2013 , 05:14   Re: [L4D & L4D2] Gun Cabinet (1.0) [08-Aug-2013]
    Reply With Quote #8

    OMG, i did it. Thank you very much =]]
    lightpro is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-11-2013 , 05:14   Re: [L4D & L4D2] Gun Cabinet (1.0) [08-Aug-2013]
    Reply With Quote #9

    Nice one
    __________________

    Last edited by Silvers; 08-11-2013 at 05:15.
    Silvers is offline
    printoypoo
    New Member
    Join Date: Aug 2013
    Old 08-17-2013 , 17:37   Re: [L4D & L4D2] Gun Cabinet (1.0) [08-Aug-2013]
    Reply With Quote #10

    can increase guns easily
    It is a very good thing
    Thank you very much for your plugin
    printoypoo is offline
    Reply



    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 01:02.


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