Raised This Month: $12 Target: $400
 3% 

[L4D & L4D2] Weapon Crate (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:
3821
Plugin Version:
1.8
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    3 
    Plugin Description:
    Spawns a weapon in a weapon crate/locker, these can be temporary or saved for auto-spawning.
    Old 08-08-2013 , 08:09   [L4D & L4D2] Weapon Crate (1.8) [11-Dec-2022]
    Reply With Quote #1



    Related Plugins:

    About:
    • The locker and crate models are non-solid, the weapons will not collide with them and can fall freely.
    • To change their origin/angles you must be near the object, you will affect the nearest weapon crate.
    • Data config saved to l4d_weapon_crate.cfg in your servers \addons\sourcemod\data\ folder.
    • 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_weapon_crate         // Opens a menu of weapons/items to spawn. Spawns a temporary weapon at your crosshair.
    sm_weapon_crate_save    // Opens a menu of weapons/items to spawn. Spawns a weapon at your crosshair and saves to config.
    sm_weapon_crate_del     // Removes the weapon you are pointing at and deletes from the config if saved.
    sm_weapon_crate_clear   // Removes all weapons spawned by this plugin from the current map.
    sm_weapon_crate_wipe    // Removes all weapons spawned by this plugin from the current map and deletes them from the config.
    sm_weapon_crate_glow    // Toggle to enable glow on all weapons to see where they are placed.
    sm_weapon_crate_list    // Display a list weapon positions and the total number of.
    sm_weapon_crate_tele    // Teleport to a weapon (Usage: sm_weapon_crate_tele <index: 1 to MAX_SPAWNS (32)>).
    sm_weapon_crate_ang     // Displays a menu to adjust the weapon angles your crosshair is over.
    sm_weapon_crate_pos     // Displays a menu to adjust the weapon origin your crosshair is over. 


    Cvars:

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

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

    // 0=Infinite. How many items/weapons to give from 1 spawner.
    l4d_weapon_crate_count "1"

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

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

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

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

    // 0=Off. Chance out of 100 to randomise the type of item/weapon regardless of what it's set to.
    l4d_weapon_crate_randomise "25"

    // Weapon Crate plugin version.
    l4d_weapon_crate_version 


    Changes:
    Code:
    1.8 (11-Dec-2022)
        - Changes to fix compile warnings on SourceMod 1.11.
    
    1.7 (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.
        - Various optimizations and fixes.
    
    1.6 (01-Apr-2020)
        - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
    
    1.5 (05-May-2018)
        - Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
        - Changed cvar "l4d_weapon_crate_modes_tog" now supports L4D1.
    
    1.4.1 (20-Nov-2015)
        - Fixed the Sniper Scout not spawning when "l4d_weapon_spawn_count" cvar was set to 0.
    
    1.4 (19-Nov-2015)
        - Fixed Auto Shotgun ammo in L4D1 not filling.
        - Fixed some guns not spawning when "l4d_weapon_crate_count" cvar was set to 0.
    
    1.3 (29-Mar-2015)
        - Fixed the plugin not loading in L4D1 due to an Invalid Convar Handle.
    
    1.2 (18-Aug-2013)
        - Added cvar "l4d_weapon_crate_count" to set how many times a spawner gives items/weapons before disappearing.
        - Added cvar "l4d_weapon_crate_randomise" to randomise the spawns based on a chance out of 100.
    
    1.1 (11-Aug-2013)
        - Fixed the "sm_weapon_crate_del" command to work.
    
    1.0 (08-Aug-2012)
        - Initial release.


    Installation:
    • Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_weapon_crate.sp - 548 views - 49.9 KB)
    __________________

    Last edited by Silvers; 12-11-2022 at 03:50.
    Silvers is offline
    cree
    BANNED
    Join Date: May 2013
    Location: GB
    Old 08-08-2013 , 15:52   Re: [L4D & L4D2] Weapon Crate [08-Aug-2013]
    Reply With Quote #2

    very nice gonna give these a try
    cree is offline
    Send a message via ICQ to cree Send a message via AIM to cree Send a message via Yahoo to cree Send a message via Skype™ to cree
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-11-2013 , 05:09   Re: [L4D & L4D2] Weapon Crate (1.0) [08-Aug-2013]
    Reply With Quote #3

    1.1 (11-Aug-2013)
    - Fixed the "sm_weapon_crate_del" command to work.

    Thanks to Chatyak for reporting
    __________________
    Silvers is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 08-18-2013 , 12:43   Re: [L4D & L4D2] Weapon Crate (1.2) [18-Aug-2013]
    Reply With Quote #4

    Plugin updated:

    1.2 (18-Aug-2013)
    - Added cvar "l4d_weapon_crate_count" to set how many times a spawner gives items/weapons before disappearing.
    - Added cvar "l4d_weapon_crate_randomise" cvar to randomise the spawns based on a chance out of 100.
    __________________
    Silvers is offline
    Alexmy
    Senior Member
    Join Date: Oct 2014
    Location: Russian Federation
    Old 11-03-2014 , 02:42   Re: [L4D & L4D2] Weapon Crate (1.2) [18-Aug-2013]
    Reply With Quote #5

    hello plugin does not run on the server that's left 4 dead bug
    L 11/03/2014 - 1364: SourceMod error session started
    L 11/03/2014 - 1364: Info (map "l4d_hospital01_apartment") (file "errors_20141103.log")
    L 11/03/2014 - 1364: [SM] Unable to load extension "cleaner.ext": Could not read configs/cleaner.cfg.
    L 11/03/2014 - 1364: [SM] Native "HookConVarChange" reported: Invalid convar handle 0 (error 4)
    L 11/03/2014 - 1364: [SM] Displaying call stack trace for plugin "l4d_weapon_crate.smx":
    L 11/03/2014 - 1364: [SM] [0] Line 259, /home/forums/content/files/8/5/7/7/8/123923.attach::OnPluginStart()
    L 11/03/2014 - 1365: [SM] Native "SetConVarInt" reported: Invalid convar handle 0 (error 4)
    Alexmy is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 03-29-2015 , 07:29   Re: [L4D & L4D2] Weapon Crate (1.3) [29-Mar-2015]
    Reply With Quote #6

    1.3 (29-Mar-2015) - Fixed the plugin not loading in L4D1 due to an Invalid Convar Handle.
    __________________
    Silvers is offline
    sos crazy89
    Member
    Join Date: May 2015
    Location: Russia
    Old 07-20-2015 , 21:00   Re: [L4D & L4D2] Weapon Crate (1.3) [29-Mar-2015]
    Reply With Quote #7

    l4d1 ammo autoshotgun 10 pls fix
    __________________
    sos crazy89 is offline
    Figa
    Member
    Join Date: Apr 2011
    Location: Siberia
    Old 08-16-2015 , 23:13   Re: [L4D & L4D2] Weapon Crate (1.3) [29-Mar-2015]
    Reply With Quote #8

    Quote:
    Originally Posted by sos crazy89 View Post
    l4d1 ammo autoshotgun 10 pls fix
    Edit source:


    PHP Code:
    else if( model == )                    ammo g_iAmmoAutoShot
    Change on

    PHP Code:
    else if( model == )                    ammo g_iAmmoShotgun
    Figa is offline
    sos crazy89
    Member
    Join Date: May 2015
    Location: Russia
    Old 09-29-2015 , 14:21   Re: [L4D & L4D2] Weapon Crate (1.3) [29-Mar-2015]
    Reply With Quote #9

    thx I have long searched for an error
    __________________
    sos crazy89 is offline
    soscrazy89
    Junior Member
    Join Date: Nov 2015
    Old 11-18-2015 , 07:00   Re: [L4D & L4D2] Weapon Crate (1.3) [29-Mar-2015]
    Reply With Quote #10

    Quote:
    Originally Posted by Silvers View Post
    1.3 (29-Mar-2015) - Fixed the plugin not loading in L4D1 due to an Invalid Convar Handle.


    hello Silvers no work spawn all weapons Counter-Strike

    L 11/18/2015 - 14:17:47: [SM] Displaying call stack trace for plugin "l4d_weapon_crate.smx":
    L 11/18/2015 - 14:17:47: [SM] [0] Line 676, /home/groups/sourcemod/upload_tmp/phpa0vnWD.sp::CreateSpawn()
    L 11/18/2015 - 14:17:47: [SM] [1] Line 916, /home/groups/sourcemod/upload_tmp/phpa0vnWD.sp::CmdSpawnerSaveMenu()
    L 11/18/2015 - 14:17:47: [SM] [2] Line 770, /home/groups/sourcemod/upload_tmp/phpa0vnWD.sp::ListMenuHandler()
    soscrazy89 is offline
    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 09:43.


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