Raised This Month: $95 Target: $400

[L4D & L4D2] Lamps (1.5) [24-Oct-2019]

Post New Thread Reply   
Thread Tools Display Modes
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
Plugin Version:
Plugin Category:
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    Plugin Description:
    Spawns various Lamps.
    Old 02-28-2012 , 02:16   [L4D & L4D2] Lamps (1.5) [24-Oct-2019]
    Reply With Quote #1


    (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)

    • 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.).

    • 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            // Spawns a temporary Lamp at your crosshair.
    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... 


    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 "c1m3_mall"

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

    // Lamps plugin version.

    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.

    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 - 68 views - 74.9 KB)

    Last edited by Silvers; 10-24-2019 at 19:07.
    Silvers is offline
    Senior Member
    Join Date: Dec 2009
    Location: Hong Kong
    Old 02-28-2012 , 02:18   Re: [L4D2] Lamp (1.0) [28-Feb-2012]
    Reply With Quote #2

    Best plugin ever in l4d2 !!!
    Now everyone can improve the maps' lighting effects WOOOO
    alexip121093 is offline
    Send a message via MSN to alexip121093
    AlliedModders Donor
    Join Date: Aug 2011
    Location: Russian
    Old 02-28-2012 , 04:35   Re: [L4D2] Lamp (1.0) [28-Feb-2012]
    Reply With Quote #3

    Make the World Brighter!
    disawar1 aka raziEiL on: Sourcemod, GitHub, Bitbucket, DeviantArt
    > Grokking Algorithms!
    disawar1 is offline
    Senior Member
    Join Date: Aug 2011
    Old 02-28-2012 , 20:46   Re: [L4D2] Lamp (1.0) [28-Feb-2012]
    Reply With Quote #4

    Hi Silvers,

    How do you get the menu to show on screen? I have the plugin loaded and set the cfg but I don't see any option for lamps when I open my admin menu.
    chatyak is offline
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 02-28-2012 , 22:56   Re: [L4D2] Lamp (1.0) [28-Feb-2012]
    Reply With Quote #5

    Silvers is offline
    Senior Member
    Join Date: Feb 2010
    Old 02-29-2012 , 10:32   Re: [L4D2] Lamp (1.0) [28-Feb-2012]
    Reply With Quote #6

    Hello Silvers, is it possible to make this for l4d1 as well?
    Danny_l4d is offline
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 02-29-2012 , 11:29   Re: [L4D2] Lamp (1.0) [28-Feb-2012]
    Reply With Quote #7

    Too long, missing models etc. I would have otherwise.
    Silvers is offline
    Senior Member
    Join Date: Mar 2010
    Old 03-02-2012 , 14:40   Re: [L4D2] Lamp (1.0) [28-Feb-2012]
    Reply With Quote #8

    Amazing plugin been using it these past days. Though if I may ask, how did you make one the lamps to "spin" around, since I noticed the entire prop rotated. Since I'd really like to do this for regular prop spawning to make for example: An obstacle course. (What part of code is this?)
    Elektramode is offline
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 03-02-2012 , 15:01   Re: [L4D2] Lamp (1.0) [28-Feb-2012]
    Reply With Quote #9

    Search for "spin", 3rd hit...
    Silvers is offline
    Join Date: Jan 2011
    Old 03-28-2012 , 19:56   Re: [L4D2] Lamp (1.0) [28-Feb-2012]
    Reply With Quote #10

    Silver, i want to change the color of the lamp i spawn in the menu, but i press "color" "red" "save" "refresh" and when i spawn again, it's white.
    Can you help me?
    andre_sca is offline

    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 08:52.

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