[L4D & L4D2] Flare (2.0) [02-Dec-2011]





This plugin was originally from the Flare and Light Package. I have seperated the Flare, Flashlight and Flare Gun into new plugins. I'm still working on the Flare Gun.







Thanks:

  • SilentBr - for the idea and request.

  • Mr.RuyC - For 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 - Provided Russian translations.







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. Data saved to l4d_flare.cfg in your left4dead\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 colour. The ground flare has an optional second set of RGB values to control extra smoke colour (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:



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 colour. The ground flare has an optional second set of RGB values to control extra smoke colour (env_steam) but if they are not specified the first set will be used.




PHP Code:







sm_flareclient     // Attach a flare on specified player.
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_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. 













Cvars:



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




PHP Code:







// Attached flare
l4d_flare_attach_cmd_allow    "2"         // 0=Disable sm_self command. 1=Incapped only (not admins). 2=Any time. // Minimum: "0.000000" Maximum: "2.000000"
l4d_flare_attach_cmd_flags    ""          // Players with these flags may use the sm_flareme command. (Empty = all).
l4d_flare_attach_fuse         "1"         // Adds the pipebomb fuse particles to the flare.
l4d_flare_attach_light_allow&nbs p; "1"         // 0=Off, 1=Attaches light_dynamic glow to the player.
l4d_flare_attach_light_colour "200 20 15" // Defines the light colour. RGB (red, green, blue) values (0-255).
l4d_flare_attach_stock        "1"         // 0=Off, 1=Adds The Sacrifice flare smoke particles.
l4d_flare_attach_time         "10.0"      // How long the attached flares should burn. 1 flare per player.

// Ground flare
< /span>l4d_flare_ground_cmd_allow    "2"         // 0=Disable sm_flare command. 1=Incapped only (not admins). 2=Any time.
l4d_flare_ground_cmd_flags    ""          // Players with these flags may use the sm_flare command. Empty = all.
l4d_flare_ground_fuse         "1"         // Adds the pipebomb fuse particles to the flare.
l4d_flare_ground_light_allow  "1"         // Light glow aro und flare. 0=Off, 1=light_dynamic, 2=point_spotlight. // Minimum: "0.000000" Maximum: "2.000000"
l4d_flare_ground_light_bright "255"       // Brightness of the light <10-255>. // Minimum: "10.000000" Maximum: "255.000000"
l4d_flare_ground_light_colour "200 20 15" // Defines the light colour. RGB (red, green, blue) values (0-255).
l4d_flare_ground_smoke_allow  "0"         // 0=Off, 1=Adds extra smoke to the flare (env_steam).
l4d_flare_ground_smoke_alpha  "60"         ;// Transparency of the extra smoke (10-255). // Minimum: "10.000000" Maximum: "255.000000"
l4d_flare_ground_smoke_colour "200 20 15" // Defines the extra smoke colour. RGB values must be between 0-255.
l4d_flare_ground_smoke_height "100"       // How tall the extra smoke should rise.
l4d_flare_ground_stock        "1"         // 0=Off, 1=Adds The Sacrifice flare smoke particles.
l4d_flare_ground_upgrade      "1"       & nbsp; // 0=Off, 1=Drop a flare when incendiary or explosive rounds are deployed.

// Plugin cvars
l4d_flare_allow               "1"         // 0=Plugin off, 1=Plugin on.
l4d_flare_incapped            "1"         // Display flare when incapped. 0=Off, 1=On ground, 2=Attach to player.
l4d_flare_intro               "35.0"      // 0=Off, Show intro&nb sp;message in chat this many seconds after joining. // Minimum: "0.000000" Maximum: "120.000000"
l4d_flare_lock_colors         "0"         // 0=Let players edit light/smoke colors, 1=Force to cvar specified.
l4d_flare_max_total           "32"        // Limit the total number of simultaneous flares. // Minimum: "1.000000" Maximum: "32.000000"
l4d_flare_modes               ""          // Enable plugin on these gamemodes, separate by commas. (Empty = all)
l4d_flare_notify              "1"         // 0=Off, 1=Print hints to chat (requires translation file provided).
l4d_flare_time                "10.0"      // How long the flares should burn, blocks non-admins making flares also. // Minimum: "1.000000" Maximum: "120.000000"
l4d_flare_version                    ;      // Flare plugin version. 













Change log:




Code:


2.0

        - Plugin separated and taken from the "Flare and Light Package" plugin.

        - 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

        - Initial release.






Requirements:

  • This plugin requires the SDKHooks extension.





Installation:
  1. Download the .zip and extract the files to their respective folders within your \addons\sourcemod\ folder.





Compiling:

  1. You will need to put the SDKHooks include into your scripting\include folder. Don't forget to update the gamedata.txt!

  2. You will need the colors.inc in your scripting\include folder.

  3. Put the plugin .sp file in your scripting folder and compile!
















Attached Files





File Type: zip


l4d_flare.zip (48.0 KB)








Orignal From: [L4D & L4D2] Flare (2.0) [02-Dec-2011]

No comments

Not a single link is allowed to submit in comment :o