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

[L4D & L4D2] Lamps (1.10) [21-Dec-2022]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
2823
Plugin Version:
1.10
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    5 
    Plugin Description:
    Spawns various Lamps.
    Old 02-28-2012 , 01:16   [L4D & L4D2] Lamps (1.10) [21-Dec-2022]
    Reply With Quote #1



    (Menu)


    (1, 2, 3, 4)


    (1, 2, 3, 4, 5)


    (1, 2, 2, 4, 5, 6, 7, 8)


    (Images thanks to disawar1: 1, 2, 3, 4, 5)



    About:
    • Selection of 39 lamps to spawn (few less in L4D1).
    • Save up to 32 lamps for auto-spawning (config saved to l4d_lamp.cfg in your servers \addons\sourcemod\data\ folder.).


    Thanks:
    • alexip121093
    • disawar1
    • xioSlayer
    • Mr. Man
    • Recon-1
    • [Resistance] Yoshi
    • kaos
    • ilyaadminman
    • Herbie_06


    Known Bugs:
    • On occasion lamps cannot be broken. This seems to be a problem with entity outputs.
    • A maximum of 32 light_dynamic entities can light up the map at one time.
    • Plugins and maps which use light_dynamic entities, affect how many Lamps actually light up the map.
    • Lamps are FPS intensive. I would highly recommend that you do not exceed 20 Lamps per map, for this and the above reasons.


    Admin Commands: (requires "z" flag)

    PHP Code:
    sm_lamp            // Opens the menu to spawn a temporary lamp. Optional arg spawns a temporary Lamp at your crosshair: sm_lamp [index]
    sm_lampset         // Will save temp lamps to the map. 0 args = save origin/angles/color/brightness. 2 args = sm_lampset <break|bright|beam|glow|halo|length|width|speed> <value>. 3 args = sm_set <R> <G> <B> (color255)
    sm_lampdel         // Removes the Lamp you are pointing at and deletes from the config if saved.
    sm_lampclear       // Removes all lamps from the current map.
    sm_lampwipe        // Removes all lamps from the current map and deletes them from the config.
    sm_lamprefresh     // Removes all lamps from the current map and reloads the maps config.

    // Examples of sm_lampset with 2 arguements:
    sm_lampset glow 0.2     // (Only works on types which have Beams, eg: Dropped, Floodlight, Generators, Spin, Police etc.)
    sm_lampset halo 50      // (Beam types) changes the halo around the source.
    sm_lampset beam 100     // (Beam types) affects the beam opacity.
    sm_lampset length 300   // (Beam types) length of the beam.
    sm_lampset width 40     // (Beam types) width of the beam.
    sm_lampset speed 100    // (Spin types, eg: Spin, Police.)
    sm_lampset bright 300   // (All types except TV, Generator3 and Emergency.)
    sm_lampset break 1      // (All types) 1 to allow breaking, 0 to disallow.

    // Examples of sm_lampset with 3 arguements:
    sm_lampset 255 0 0      // Sets the color to red. Changes may not be visible unless saved and refreshed.
    sm_lampset 255 100 10   // Another color... 


    CVars:

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

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

    // 0=No. 1=Yes. Lights can break when damaged.
    l4d_lamp_break "1"

    // Brightness of new lamps.
    l4d_lamp_bright "150.0"

    // The beam color. RGB (red, green, blue) values (0-255).
    l4d_lamp_color "250 250 200"

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

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

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

    // Prevent pre-caching models on these maps, separate by commas (no spaces). Enabling plugin on these maps will crash the server.
    l4d_lamp_precache ""

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

    // Lamps plugin version.
    l4d_lamp_version 


    Changes:
    Code:
    1.10 (21-Dec-2022)
        - Changed command "sm_lamp" to spawn a temporary lamp by index. Requested by "replay_84".
    
    1.9 (11-Dec-2022)
        - Changes to fix compile warnings on SourceMod 1.11.
    
    1.8 (30-Sep-2020)
        - Changed "l4d_lamp_precache" cvar default value to blank.
        - Fixed compile errors on SM 1.11.
    
    1.7 (10-May-2020)
        - Extra checks to prevent "IsAllowedGameMode" throwing errors.
        - Increased "l4d_lamp_precache" cvar length, max usable length 490 (due to game limitations).
        - 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 (24-Oct-2019)
        - Added cvar "l4d_lamp_precache" to prevent pre-caching models on specified maps.
    
    1.4 (24-Oct-2019)
        - Added support for L4D1.
    
    1.3.1 (28-Jun-2019)
        - Changed PrecacheParticle method.
    
    1.3 (05-May-2018)
        - Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
    
    1.2 (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.1 (10-May-2012)
        - Added cvar "l4d2_lamp_modes_off" to control which game modes the plugin works in.
        - Added cvar "l4d2_lamp_modes_tog" same as above.
    
    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.4:
    • 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_lamp.sp - 734 views - 77.8 KB)
    __________________

    Last edited by Silvers; 12-21-2022 at 08:22.
    Silvers is offline
     



    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 15:15.


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