1,
2,
3,
4,
5,
6,
7,
8,
9
(Screenshots from version 1.0, alignment now perfect from version 2.0)
Related Plugins:
About:- Displays halo and beam on weapons with flashlights turned on.
- Version 2.0 has perfect alignment and attachment to the weapons "flashlight" attachment point.
- Bug: Beams attached to custom weapon skins appear incorrectly at a 90 degree angle.
Thanks:- alexip121093 - For the idea and testing.
- disawar1
- ilyaadminman
- Herbie_06
Commands:
PHP Code:
sm_glare // Set glare color. !glare <color name|R G B>. Or 3 values 0-255. EG: !glare red or !glare 255 0 0
CVars:
Saved to
l4d_glare.cfg in your servers
\cfg\sourcemod\ folder.
PHP Code:
// 0=Plugin off, 1=Plugin on.
l4d_glare_allow "1"
// Can bots have Glare beams? 0=Off. 1=Give using the _color cvar. 2=Give random color.
l4d_glare_bots "2"
// Brightness of the beam.
l4d_glare_bright "150.0"
// The beam color. Three values between 0-255 separated by spaces. RGB Color255 - Red Green Blue.
l4d_glare_color "250 250 200"
// 0=New players glare is turned off by default. 1=New players glare is turned on by default.
l4d_glare_default "1"
// Brightness of the halo (glare).
l4d_glare_halo "0.4"
// Length of the beam.
l4d_glare_length "50"
// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d_glare_modes ""
// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d_glare_modes_off ""
// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d_glare_modes_tog ""
// 0=Hide your own glow. 1=Show glow (will attempt to detect and hide when in first person).
l4d_glare_transmit "1"
// Width of the beam.
l4d_glare_width "5"
// Glare plugin version.
l4d_glare_version
Changes:
Code:
2.15 (10-Jan-2024)
- Fixed the saved color not restoring on connection when the cookies are loaded early. Thanks to "Voevoda" for reporting.
- Possibly fixed rare invalid handle errors. Thanks to "Voevoda" for reporting.
2.14 (28-Aug-2022)
- Really fixed invalid handles.
- Explanation: the forward "Attachments_OnWeaponSwitch" triggers when someone disconnects and their weapon drops.
- This triggered the plugin to attempt to create a light for that player while they were disconnecting and still in-game.
- At that point another timer handle was being created but never cleared because they were already disconnecting.
- This happens before OnClientDisconnect_Post. Using a bool to store when someone is disconnecting prevents the bug.
2.13 (19-Aug-2022)
- Changes attempting to fix invalid handles. Thanks to "gongo" and "ur5efj" for reporting.
2.12 (04-Aug-2022)
- Changes to fix floating beams and broken beams, mostly in L4D1. Thanks to "gongo" for reporting and help testing.
- Changes to support unloading and late loading of the "Attachments_API" plugin.
- Fixed the "Auto Shotgun" weapon not having beams in L4D1.
2.11 (11-Jun-2022)
- Fixed not removing the beam on client disconnect. Thanks to "gongo" for reporting.
2.10 (09-Jun-2022)
- Fixed invalid client errors. Thanks to "gongo" for reporting.
2.9 (09-Jun-2022)
- Fixed the beam not changing color when in thirdperson view.
- Fixed a random beam showing on the map at 0,0,0. Thanks to "Lux" for a solution.
- Fixed the "tongue_grab" event from throwing "no active hook" errors. No longer toggling the hook.
2.8 (29-Apr-2022)
- Added cvar "l4d_glare_bots" to control if bots can use the Glare Beams. Requested by "Voevoda".
- Fixed cvar "l4d_glare_default" to only affect new players who haven't set a glare color. Thanks to "Voevoda" for reporting.
2.7 (18-Sep-2021)
- Menu now returns to the page it was on before selecting an option.
- Fixed showing the glare when the light is off and changing colors in the menu.
2.6 (11-Jul-2021)
- Added cvar "l4d_glare_default" to default the glare to off for new players.
- Added menu option "Off" to turn off the glare.
- Requested by "Voevoda".
2.5 (01-Jul-2021)
- Added a warning message to suggest installing the "Use Priority Patch" plugin.
2.4 (27-Mar-2021)
- L4D1: Fixed the beam being visible in first person view when first starting and not detecting thirdperson status.
2.3 (05-Aug-2020)
- Fixed displaying the beam when using a minigun.
2.2 (15-Jul-2020)
- Fixed an error where client cookies are cached but the client is not yet in-game.
2.1 (04-Jul-2020)
- Fixed not compiling on SourceMod 1.11.
- Plugin "Attachments_API" updated and required.
2.0 (30-May-2020)
- Glare beam now properly aligned with all weapon flashlight attachment points for all survivors.
- Glare position fixed when a players model has changed. Does this by dropping all weapons/items for 0.1s.
- Optionally uses "ThirdPersonShoulder_Detect" plugin to enable/disable beam when changing view.
- Removed commands "sm_glareang" and "sm_glarepos". No more manual positioning required.
- Suggest changing cvar "l4d_glare_width" value to "5" to correctly match flashlight size.
- Thanks to "Lux" for the bone merge method. Adapted from "Incapped Crawling" plugin.
1.5 (17-May-2020)
- Fixed Zoey's glare position in L4D2 for Spas Shotgun.
1.4 (10-May-2020)
- Extra checks to prevent "IsAllowedGameMode" throwing errors.
- Various changes to tidy up code.
- Various optimizations and fixes.
1.3 (01-Apr-2020)
- Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
- Added cvar "l4d_glare_transmit" to show or hide your own glare.
- Added command "sm_glare" for players to set their glare color. Requested by "Awerix".
- Usage: !glare <color name|R G B>. Or 3 values 0-255. EG: !glare red or !glare 255 0 0
1.2 (05-May-2018)
- Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
- Changed cvar "l4d_glare_modes_tog" now supports L4D1.
1.1.1 (31-Mar-2018)
- Fixed not working in L4D1.
- Did anyone use this or realize it wasn't working?
1.1 (10-May-2012)
- Added commands "sm_glarepos" and "sm_glareang" to position the beam. Affects all players.
- Fixed the beam sticking when players have no weapons.
- Removed colors.inc include.
1.0 (30-Mar-2012)
- Initial release.
Incompatible:- L4D1 game bug: this plugin is incompatible with the Weapon Charms plugin, beam_spotlight turning on/off breaks the position. Tried to fix, not wasting more hours.
Updating from 2.7 or older:- New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.
Requirements:- Attachment_API plugin.
- ThirdPersonShoulder_Detect plugin.
Installation:DO NOT click 'Get Plugin' or it will fail to compile because this plugin requires Attachment_API and ThirdPersonShoulder_Detect!
- Download the .smx file and put into your servers \addons\sourcemod\plugins folder. (Compiled with 1.10).
- Install the Use Priority Patch plugin to prevent blocking +USE.