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

[L4D & L4D2] Flare (2.9) [07-Nov-2023]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
2694
Plugin Version:
2.9
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    29 
    Plugin Description:
    Creates flares like those from The Sacrifice, either by command or automatically when incapped or upgrade ammo is deployed, either on the ground or attached.
    Old 12-02-2011 , 17:54   [L4D & L4D2] Flare (2.9) [07-Nov-2023]
    Reply With Quote #1


    This plugin was originally part of the Flare and Light Package. I have seperated the Flare, Flashlight and Flare Gun into new plugins.



    Thanks:
    • SilentBr - for the idea and request.
    • Mr.RuyC - For recording videos and playing for hours and hours testing the plugin on his server.
    • nakashimakun - Who came up with the plugin name. Also tested the plugin on his server.
    • honorcode23, DJ_WEST, AtomicStryker, Boikinov, pimpinjuice and FoxMulder for source code (full credits inside the source).
    • NanX, japan555, CeeJ, Farmer, SilentBr, sapphire989, Visual77, Mr. Man and everyone else who helped testing, it's been fun!
    • disawar1 - Testing 2.0 and finding bugs, Russian translation.



    Details:
    • Creates flares like those from The Sacrifice. On the ground or attached to players.
    • Automatically creates a flare next to players when incapped, explosive ammo is deployed or by player commands.
    • Admins can save flares to maps which will auto spawn on round_start. Saved to l4d_flare.cfg in your servers \addons\sourcemod\data\ folder.
    • Attached and ground flares play a burning sound (same one used for The Sacrifice flares)!
    • Checks the command access overrides for 'sm_flare' and 'sm_flareme' as well as providing cvars to control access flags.
    • Flare colors can be locked so players cannot change. Put the cvar l4d_flare_lock_colors to 1 and it will force the colors to what you specified in the config.
    • Total flares limited to 32 (l4d_flare_max_total).



    Player commands:

    Usage: sm_flare <R G B|red|green|blue|purple|orange|yellow|white>
    Optional: Color name trigger or 3 RGB values (-1 to 255) for light color. The ground flare has an optional second set of RGB values to control extra smoke color (env_steam) but if they are not specified the first set will be used.

    PHP Code:
    sm_flare    // Spawns a flare on the ground.
    sm_flareme  // Attach a flare to yourself.

    // Examples:
    sm_flare 0 0 255   // Creates a blue flare on the ground next to you.
    sm_flare green     // Green flare on the ground next to you.
    sm_flareme red     // Red flare attached to you. 


    Admin Commands: (requires "z" flag)

    Usage: sm_flareclient <#user id|name> <R G B|red|green|blue|purple|orange|yellow|white>
    Optional: Color name trigger or 3 RGB values (-1 to 255) for light color. The ground flare has an optional second set of RGB values to control extra smoke color (env_steam) but if they are not specified the first set will be used.

    PHP Code:
    sm_flareclient     // Attach a flare on specified player. Usage: sm_flareclient <#userid|name>
    sm_flareground     // Drop a flare next to specified player.

    // Examples:
    sm_flareclient Roch 0 0 255     // Creates a blue flare attached to Rochelle
    sm_flareclient Nick green       // Creates a green flare attached to Nick
    sm_flareground @survivors red   // Creates a red flare next to all survivors

    sm_flaresave       // Spawns a flare at your crosshair and saves to config. Usage: sm_flaresave <r> <g> <b>.
    sm_flareset        // Usage: sm_flareset <r> <g> <b>. Changes the nearest flare light color and saves to config.
    sm_flareglow       // Toggle placed flares to Glow showing their location.
    sm_flarelist       // Display a list flare positions and the number of flares.
    sm_flaredel        // Removes the flare you are nearest to and deletes from the config if saved.
    sm_flareclear      // Removes all fire flares from the current map.
    sm_flarewipe       // Removes all fire flares from the current map and deletes them from the config.
    sm_flarebug        // When the plugin fails to work during a round, run this command and report the error. 


    CVars:

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

    PHP Code:
    // Attached flare
    // 0=Disable sm_self command. 1=Incapped only (not admins). 2=Any time.
    l4d_flare_attach_cmd_allow "2"

    // Players with these flags may use the sm_flareme command. (Empty = all).
    l4d_flare_attach_cmd_flags ""

    // Adds the pipebomb fuse particles to the flare.
    l4d_flare_attach_fuse "1"

    // 0=Off, 1=Attaches light_dynamic glow to the player.
    l4d_flare_attach_light_allow "1"

    // The light color. Three values between 0-255 separated by spaces. RGB Color255 - Red Green Blue.
    l4d_flare_attach_light_colour "200 20 15"

    // 0=Off, 1=Adds The Sacrifice flare smoke particles.
    l4d_flare_attach_stock "1"

    // How long the attached flares should burn. 1 flare per player.
    l4d_flare_attach_time "10.0"


    // Ground flare
    // 0=Disable sm_flare command. 1=Incapped only (not admins). 2=Any time.
    l4d_flare_ground_cmd_allow "2"

    // Players with these flags may use the sm_flare command. Empty = all.
    l4d_flare_ground_cmd_flags ""

    // Adds the pipebomb fuse particles to the flare.
    l4d_flare_ground_fuse "1"

    // Light glow around flare. 0=Off, 1=light_dynamic, 2=point_spotlight.
    l4d_flare_ground_light_allow "1"

    // Brightness of the light <10-255>.
    // Minimum: "10.000000" Maximum: "255.000000"
    l4d_flare_ground_light_bright "255"

    // The light color. Three values between 0-255 separated by spaces. RGB Color255 - Red Green Blue.
    l4d_flare_ground_light_colour "200 20 15"

    // 0=Off, 1=Adds extra smoke to the flare (env_steam).
    l4d_flare_ground_smoke_allow "0"

    // Transparency of the extra smoke (10-255).
    // Minimum: "10.000000" Maximum: "255.000000"
    l4d_flare_ground_smoke_alpha "60"

    // The extra smoke color. Three values between 0-255 separated by spaces. RGB Color255 - Red Green Blue.
    l4d_flare_ground_smoke_colour "200 20 15"

    // How tall the extra smoke should rise.
    l4d_flare_ground_smoke_height "100"

    // 0=Off, 1=Adds The Sacrifice flare smoke particles.
    l4d_flare_ground_stock "1"

    // 0=Off, 1=Drop a flare when incendiary or explosive rounds are deployed.
    l4d_flare_ground_upgrade "1"


    // Plugin cvars
    // 0=Plugin off, 1=Plugin on.
    l4d_flare_allow "1"

    // Display flare when incapped. 0=Off, 1=On ground, 2=Attach to player.
    l4d_flare_incapped "1"

    // 0=Off, Show intro message in chat this many seconds after joining.
    // Minimum: "0.000000" Maximum: "120.000000"
    l4d_flare_intro "35.0"

    // 0=Let players edit light/smoke colors, 1=Force to cvar specified.
    l4d_flare_lock "0"

    // Limit the total number of simultaneous flares.
    // Minimum: "1.000000" Maximum: "32.000000"
    l4d_flare_max_total "32"

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

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

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

    // 0=Off, 1=Print hints to chat (requires translation file provided).
    l4d_flare_notify "1"

    // How long the flares should burn, blocks non-admins making flares also.
    // Minimum: "1.000000" Maximum: "120.000000"
    l4d_flare_time "10.0"

    // Flare plugin version.
    l4d_flare_version 


    Changes:
    Code:
    2.9 (07-Nov-2023)
        - Fixed memory leak. Thanks to "HarryPotter" for reporting.
        - Added Simplified Chinese and Traditional Chinese translations. Thanks to "HarryPotter" and "CIKK".
    
    2.8 (11-Dec-2022)
        - L4D2: Added command "sm_flareglow" to toggle glow on Flares to show where they are.
        - Changes to fix compile warnings on SourceMod 1.11.
    
    2.7 (01-Jul-2021)
        - Added a warning message to suggest installing the "Attachments API" and "Use Priority Patch" plugins if missing.
    
    2.6 (09-Oct-2020)
        - Changed "OnClientPostAdminCheck" to "OnClientPutInServer" - to fix any issues if Steam service is down.
    
    2.5 (10-May-2020)
        - Extra checks to prevent "IsAllowedGameMode" throwing errors.
        - Various changes to tidy up code.
        - Various optimizations and fixes.
    
    2.4 (01-Apr-2020)
        - Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
        - Removed "colors.inc" dependency.
        - Updated these translation file encodings to UTF-8 (to display all characters correctly): German (de).
    
    2.3.1 (28-Jun-2019)
        - Changed PrecacheParticle method.
        - Delete redundant if statement. Thanks to "BHaType" for reporting.
    
    2.3 (05-May-2018)
        - Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
        - Changed cvar "l4d_flare_modes_tog" now supports L4D1.
        - Potentially fixed the plugin from rarely breaking for a round.
    
    2.2.1 (19-Nov-2015)
        - Fix to prevent garbage being passed into SetVariantString, as suggested by "KyleS".
    
    2.2 (21-May-2012)
        - Added German translations - Thanks to "Dont Fear The Reaper".
    
    2.2 (30-Mar-2012)
        - Added Spanish translations - Thanks to "Januto".
        - Added cvar "l4d_flare_modes_off" to control which game modes the plugin works in.
        - Added cvar "l4d_flare_modes_tog" same as above, but only works for L4D2.
        - Changed the way "l4d_flare_attach_cmd_flags" and "l4d_flare_ground_cmd_flags" validate clients by checking they have one of the flags.
        - Fixed cvar "l4d_flare_ground_light_allow" setting of "2" not removing lights.
        - Small changes and fixes.
    
    2.1 (19-Dec-2011)
        - Fixed flares not loading on changelevel command.
        - Removed more CreateTimer functions. The game itself will remove those entities.
    
    2.0 (02-Dec-2011)
        - Plugin separated and taken from the "Flare and Light Package" plugin.
        - Added Russian translations - Thanks to "disawar1".
        - Added cvar "l4d_flare_attach_time" to control how long attached flares burn.
        - Added cvar "l4d_flare_ground_upgrade" to drop a flare when upgrade ammo is deployed.
        - Added commands: sm_flaresave, sm_flaredel, sm_flareclear, sm_flarewipe, sm_flareset, sm_flarelist.
        - Added "data/l4d_flare.cfg" so admins can save flares to maps using the above commands.
        - Added the following triggers to specify colors with sm_flare: red, green, blue, purple, orange, yellow, white.
        - Increased cvar "l4d_flare_time" from 120 to 600 seconds (10 minutes).
        - Removed cvar "l4d_flare_max_admin". Admins can place all flares instead of being limited.
        - Removed some CreateTimer functions. The game itself will remove flares after "l4d_flare_time".
    
    1.0 (29-Jan-2011)
        - Initial release.

    Compiling:
    1. Put the plugins .sp file into your scripting folder and compile the plugin.


    Installation:
    • Download the .zip and extract the files to their respective folders in your servers \addons\sourcemod\ folder.
    • Install the Use Priority Patch plugin to prevent blocking +USE.
    • Optional: Install the Attachment_API plugin to fix attachment positions breaking on model change.

    Updating from 2.1 or older:
    • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.

    Current Translations: English (en), German (de), Russian (ru), Spanish (es), Simplified Chinese (chi), Traditional Chinese (zho).
    Attached Files
    File Type: zip l4d_flare.zip (53.1 KB, 159 views)
    __________________

    Last edited by Silvers; 11-07-2023 at 06:43.
    Silvers is offline
    disawar1
    AlliedModders Donor
    Join Date: Aug 2011
    Location: Russian
    Old 12-03-2011 , 03:26   Re: [L4D & L4D2] Flare (2.0) [02-Dec-2011]
    Reply With Quote #2

    so...Congratulations! flaregun will come in the new version, right?)
    __________________
    disawar1 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 12-03-2011 , 03:55   Re: [L4D & L4D2] Flare (2.0) [02-Dec-2011]
    Reply With Quote #3

    That's correct the Flare Gun will be released soon. It has new modes which need a bit of tweaking.

    I will be updating the Flare plugin at some point to include throwable flares. These will be attached to pipebombs/molotovs/vomitjars. Please if anyone has ideas on how to activate this (command or other) please let me know.
    __________________
    Silvers is offline
    xioSlayer
    Senior Member
    Join Date: Apr 2011
    Old 12-03-2011 , 10:52   Re: [L4D & L4D2] Flare (2.0) [02-Dec-2011]
    Reply With Quote #4

    Working very well. Bug-free so far and I'm really liking the flare-on-upgrade-ammo option.

    thanks for the great plugins ;]
    xioSlayer is offline
    januto
    Member
    Join Date: Mar 2011
    Old 12-19-2011 , 04:55   Re: [L4D & L4D2] Flare (2.0) [02-Dec-2011]
    Reply With Quote #5

    What can I do if I want to change to my custom message what is typed in chat?
    __________________
    You are welcome!

    januto is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 12-19-2011 , 05:52   Re: [L4D & L4D2] Flare (2.0) [02-Dec-2011]
    Reply With Quote #6

    There's a translation file inside which you can customise.

    Edit: Updated, fixed a bug disawar1 discovered, thanks.
    __________________

    Last edited by Silvers; 12-19-2011 at 06:08.
    Silvers is offline
    disawar1
    AlliedModders Donor
    Join Date: Aug 2011
    Location: Russian
    Old 12-19-2011 , 09:19   Re: [L4D & L4D2] Flare (2.1) [19-Dec-2011]
    Reply With Quote #7

    np )
    __________________
    disawar1 is offline
    Silvers
    SourceMod Plugin Approver
    Join Date: Aug 2010
    Location: SpaceX
    Old 03-30-2012 , 07:25   Re: [L4D & L4D2] Flare (2.2) [30-Mar-2012]
    Reply With Quote #8

    Plugin updated:

    2.2 (30-Mar-2012)
    - Added Spanish translations - Thanks to Januto.
    - Added cvar "l4d_flare_modes_off" to control which game modes the plugin works in.
    - Added cvar "l4d_flare_modes_tog" same as above, but only works for L4D2.
    - Changed the way "l4d_flare_attach_cmd_flags" and "l4d_flare_ground_cmd_flags" validate clients by checking they have one of the flags.
    - Fixed cvar "l4d_flare_ground_light_allow" setting of "2" not removing lights.
    - Small changes and fixes.
    __________________
    Silvers is offline
    Simca
    Senior Member
    Join Date: Feb 2012
    Old 04-21-2012 , 23:40   Re: [L4D & L4D2] Flare (2.2) [30-Mar-2012]
    Reply With Quote #9

    Wouldn't this be a problem for people with low specs (PC)?
    Simca is offline
    DrDarkTempler
    Member
    Join Date: Apr 2012
    Old 04-25-2012 , 03:19   Re: [L4D & L4D2] Flare (2.2) [30-Mar-2012]
    Reply With Quote #10

    Hey silver, can you check if Flare mod is working on 1.4.2 Sourcemod?

    I was having trouble with my server and had to upgrade the sourcemod from 1.3.4. to 1.4.2, now the flare mod isn't work, or im doing something incorrectly lol

    sm_flare or !flare do nothing, console itself didn't even say if this command existed or not lol


    Edit: nevermind, seen i have to load a new map before the plugin kicks in

    Last edited by DrDarkTempler; 04-25-2012 at 03:25.
    DrDarkTempler 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 11:13.


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