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

[L4D & L4D2] Ammo Pile Spawner (1.9) [11-Dec-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
3762
Plugin Version:
1.9
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    23 
    Plugin Description:
    Spawns ammo piles
    Old 07-18-2013 , 05:48   [L4D & L4D2] Ammo Pile Spawner (1.9) [11-Dec-2022]
    Reply With Quote #1



    Related Plugins:

    About:
    • Save up to 32 Ammo Piles for auto-spawning. Saved to l4d_ammo_spawn.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:
    • Everyone who requested (lots of you), finally I bothered.
    • dcx2 - Helped testing.
    • Sev - Helped testing.


    Admin Commands: (requires "z" flag)

    PHP Code:
    sm_ammo_spawn        // Spawns a temporary ammo pile at your crosshair. Usage: sm_ammo_spawn [1=L4D model, 2=L4D2 model, 3=L4D2 Crate]
    sm_ammo_spawn_save   // Spawns an ammo pile at your crosshair and saves to config. Usage: sm_ammo_spawn_save [1=L4D model, 2=L4D2 model, 3=L4D2 Crate]
    sm_ammo_spawn_del    // Removes the ammo pile you are pointing at and deletes from the config if saved.
    sm_ammo_spawn_clear  // Removes all ammo piles spawned by this plugin from the current map.
    sm_ammo_spawn_wipe   // Removes all ammo piles from the current map and deletes them from the config.
    sm_ammo_spawn_glow   // Toggle to enable glow on all ammo piles to see where they are placed.
    sm_ammo_spawn_list   // Display a list ammo pile positions and the total number of.
    sm_ammo_spawn_tele   // Teleport to an ammo pile (Usage: sm_ammo_spawn_tele <index: 1 to MAX_SPAWNS (32)>).
    sm_ammo_spawn_ang    // Displays a menu to adjust the ammo pile angles your crosshair is over.
    sm_ammo_spawn_pos    // Displays a menu to adjust the ammo pile origin your crosshair is over. 

    CVars:

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

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

    // 0=Off, Sets the max range at which the ammo pile glows.
    l4d_ammo_spawn_glow "200"

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

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

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

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

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

    // Ammo Pile Spawner plugin version.
    l4d_ammo_spawn_version 

    Changes:
    Code:
    1.9 (11-Dec-2022)
        - Changes to fix compile warnings on SourceMod 1.11.
    
    1.8 (15-Feb-2021)
        - Fixed invalid handle error in L4D1. Thanks to "HarryPotter" for fixing.
    
    1.7 (10-May-2020)
        - Blocked glow command and convar from L4D1 which does not support glows.
        - Extra checks to prevent "IsAllowedGameMode" throwing errors.
        - Various changes to tidy up code.
    
    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_ammo_spawn_modes_tog" now supports L4D1.
    
    1.4.1 (29-Apr-2017)
        - Fixed server crash on certain maps.
    
    1.4 (13-Jun-2015)
        - Fixed the plugin not spawning the correct model in L4D2.
    
    1.3 (29-Mar-2015)
        - Fixed the 3 ammo pile models not spawning in L4D1.
    
    1.2 (20-Jul-2013)
        - Fixed a bug which broke spawning some ammo piles.
    
    1.1 (19-Jul-2013)
        - Added command "sm_ammo_spawn_clear" to remove ammo piles spawned by this plugin from the map.
        - Changed command "sm_ammo_spawn_kill" to "sm_ammo_spawn_wipe"
        - Removed Sort_Random workaround, plugin requires SourceMod version 1.4.7 or higher.
    
    1.0 (18-Jul-2013)
        - Initial release.

    Installation:
    1. 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_ammo_spawn.sp - 620 views - 34.7 KB)
    __________________

    Last edited by Silvers; 12-10-2022 at 19:35.
    Silvers is offline
    maxRut3k
    Junior Member
    Join Date: Oct 2011
    Old 12-15-2013 , 09:12   Re: [L4D & L4D2] Ammo Pile Spawner (1.2) [20-Jul-2013]
    Reply With Quote #2

    THIS PLUGIN DOESN'T WORK FOR L4D1 !!!!!! IT CRASHES GAME ((
    When i type sm_ammo_spawn / or sm_ammo_spawn_save it crashes game and says that l4d.exe stopped working
    maxRut3k is offline
    maxRut3k
    Junior Member
    Join Date: Oct 2011
    Old 12-15-2013 , 09:18   Re: [L4D & L4D2] Ammo Pile Spawner (1.2) [20-Jul-2013]
    Reply With Quote #3

    me and my friend also give this error
    http://puu.sh/5NpvQ.png
    maxRut3k is offline
    Figa
    Member
    Join Date: Apr 2011
    Location: Siberia
    Old 10-10-2014 , 11:31   Re: [L4D & L4D2] Ammo Pile Spawner (1.2) [20-Jul-2013]
    Reply With Quote #4

    Quote:
    Originally Posted by maxRut3k View Post
    THIS PLUGIN DOESN'T WORK FOR L4D1 !!!!!! IT CRASHES GAME ((
    When i type sm_ammo_spawn / or sm_ammo_spawn_save it crashes game and says that l4d.exe stopped working
    Quote:
    Originally Posted by maxRut3k View Post
    me and my friend also give this error
    http://puu.sh/5NpvQ.png

    You have not much to correct the source:

    PHP Code:
    ...
    #define MODEL_AMMO_L4D1            "models/props/terror/Ammo_Can.mdl"
    ...
    public 
    OnMapStart()
    {
        
    PrecacheModel(MODEL_AMMO_L4Dtrue);
        
    PrecacheModel(MODEL_AMMO_L4D1true);
        if( 
    g_bLeft4Dead2 PrecacheModel(MODEL_AMMO_L4D2true);
        if( 
    g_bLeft4Dead2 PrecacheModel(MODEL_AMMO_L4D3true);
    }
    ... 

    Last edited by Figa; 10-16-2014 at 12:39.
    Figa is offline
    crazy1989
    New Member
    Join Date: Feb 2015
    Old 02-24-2015 , 17:59   Re: [L4D & L4D2] Ammo Pile Spawner (1.2) [20-Jul-2013]
    Reply With Quote #5

    #define MODEL_AMMO_L4D1 "models/props/terror/Ammo_Can.mdl"
    ...
    public OnMapStart ()
    {
    PrecacheModel ( MODEL_AMMO_L4D , true );
    PrecacheModel ( MODEL_AMMO_L4D1 , true );
    if( g_bLeft4Dead2 ) PrecacheModel ( MODEL_AMMO_L4D2 , true );
    if( g_bLeft4Dead2 ) PrecacheModel ( MODEL_AMMO_L4D3 , true );


    I did so but SourceMod Plugin Compiler. error
    line 406
    changed line 406 l4d1
    type in console sm_ammo_spawn_save 1 and get a big sign error tell how to make it work for l4d 1 This is only a sign of error but not bullets sorry for my bad english
    crazy1989 is offline
    Figa
    Member
    Join Date: Apr 2011
    Location: Siberia
    Old 02-26-2015 , 04:17   Re: [L4D & L4D2] Ammo Pile Spawner (1.2) [20-Jul-2013]
    Reply With Quote #6

    crazy1989, try this.
    For L4D 1!
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_ammo_spawn.sp - 1400 views - 32.8 KB)
    Figa is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 03-29-2015 , 10:10   Re: [L4D & L4D2] Ammo Pile Spawner (1.3) [29-Mar-2015]
    Reply With Quote #7

    Thanks, fixed.

    1.3 (29-Mar-2015) - Fixed the 3 ammo pile models not spawning in L4D1.

    1.4 (13-Jun-2015)
    - Fixed the plugin not spawning the correct model in L4D2.
    __________________

    Last edited by Silvers; 06-13-2015 at 12:47.
    Silvers is offline
    dig
    New Member
    Join Date: Jan 2016
    Old 01-31-2016 , 20:41   Re: [L4D & L4D2] Ammo Pile Spawner (1.4) [13-Jun-2015]
    Reply With Quote #8

    Crashes when using the "!ammo_spawn" command in l4d2.
    Map of the problem is c10m1_caves, there is no problem in other map.

    OS:CentOS Linux 7.2.1511
    Metamod:Source version 1.10.6
    SourceMod Version: 1.7.3-dev+5292

    meta list
    Listing 2 plugins:
    [01] SourceMod (1.7.3-dev+5292) by AlliedModders LLC
    [02] SDK Tools (1.7.3-dev+5292) by AlliedModders LLC

    sm plugins list
    [SM] Listing 17 plugins:
    01 "Admin File Reader" (1.7.3-dev+5292) by AlliedModders LLC
    02 "Admin Help" (1.7.3-dev+5292) by AlliedModders LLC
    03 "Admin Menu" (1.7.3-dev+5292) by AlliedModders LLC
    04 "Anti-Flood" (1.7.3-dev+5292) by AlliedModders LLC
    05 "Basic Chat" (1.7.3-dev+5292) by AlliedModders LLC
    06 "Basic Comm Control" (1.7.3-dev+5292) by AlliedModders LLC
    07 "Basic Commands" (1.7.3-dev+5292) by AlliedModders LLC
    08 "Basic Info Triggers" (1.7.3-dev+5292) by AlliedModders LLC
    09 "Basic Votes" (1.7.3-dev+5292) by AlliedModders LLC
    10 "Client Preferences" (1.7.3-dev+5292) by AlliedModders LLC
    11 "Fun Commands" (1.7.3-dev+5292) by AlliedModders LLC
    12 "Fun Votes" (1.7.3-dev+5292) by AlliedModders LLC
    13 Disabled: "Nextmap" (1.7.3-dev+5292) by AlliedModders LLC
    14 "Player Commands" (1.7.3-dev+5292) by AlliedModders LLC
    15 "Reserved Slots" (1.7.3-dev+5292) by AlliedModders LLC
    16 "Sound Commands" (1.7.3-dev+5292) by AlliedModders LLC
    17 "[L4D2] Ammo Pile Spawner" (1.4) by SilverShot
    dig is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 02-01-2016 , 19:00   Re: [L4D & L4D2] Ammo Pile Spawner (1.4) [13-Jun-2015]
    Reply With Quote #9

    I don't know what would cause that, something with the map I guess. You'll have to avoid using the command on that level.
    __________________
    Silvers is offline
    WhataMack
    Junior Member
    Join Date: Jul 2012
    Old 02-27-2017 , 16:26   Re: [L4D & L4D2] Ammo Pile Spawner (1.4) [13-Jun-2015]
    Reply With Quote #10

    I've had to abandon using this plugin, unfortunately; it was causing my server to crash on certain campaign levels (e.g., No Mercy - Hospital, one of the Dead Air levels and maybe others that I can't recall). This happened using both styles of ammo piles. I went through extensive testing using just this plugin and it consistently caused a crash on those certain levels. If anyone wants more details let me know.

    It's a shame, especially because I use so many of Silvers' plugins and they've all been solid and really great enhancements to the game.

    Last edited by WhataMack; 02-27-2017 at 16:26.
    WhataMack 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:59.


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