Related Plugins:
About:- Teleports a light_dynamic entity to where survivors are pointing with flashlights on.
- They must be holding a weapon which has a flashlight. Molotovs, health kit, pills etc will turn the light off.
- The higher a players ping, the slower their dynamic light will be teleported to where they are aiming.
- Double tap the Flashlight (F) key to turn on/off the dynamic light.
Thanks:- asto - For the request.
- disawar1 - Russian translations.
- bubbabyte - Helped testing.
- Don't Fear The Reaper - German translations.
CVars:
Saved to
l4d_dynamic_light.cfg in your servers
\cfg\sourcemod\ folder.
PHP Code:
// 0=Plugin off, 1=Plugin on.
l4d_dynamic_light_allow "1"
// 0=No, 1=Allow bots to have dynamic lights.
l4d_dynamic_light_bots "0"
// Brightness of the light.
l4d_dynamic_light_bright "255.0"
// The light color. Three values between 0-255 separated by spaces. RGB Color255 - Red Green Blue.
l4d_dynamic_light_color "250 250 200"
// 0=Off, 1=On. Default state of the light when players join.
l4d_dynamic_light_default "0"
// Distance the light shines before not lighting up.
l4d_dynamic_light_distance "1000"
// 0=Teleports light to the end distance. Other value starts fading the light brightness from this distance.
l4d_dynamic_light_fade "2"
// 0=All weapons and items. 1=Guns only. Which items/weapons does the light work on.
l4d_dynamic_light_guns "0"
// 0=Show the dynamic light to all players. 1=Hide the dynamic light so only other players can see it. 2=Only show to the owner.
l4d_dynamic_light_hide "0"
// 1=Print to chat, 2=Hint box.
l4d_dynamic_light_hint "3"
// 0=Off. 1=Show hint when first using the flashlight, 2=Show status on toggle, 3=Both.
l4d_dynamic_light_hints "3"
// 0=Trace directly to where they are aiming. 1=Trace hull to detect nearby entities.
l4d_dynamic_light_hull "1"
// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
l4d_dynamic_light_modes ""
// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
l4d_dynamic_light_modes_off ""
// Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
l4d_dynamic_light_modes_tog "0"
// Dynamic Light plugin version.
l4d_dynamic_light_version
Changes:
Code:
1.10 (07-Feb-2022)
- Fixed compile warnings. They did not show up before.
1.9 (06-Feb-2022)
- Fixed the light potentially teleporting behind when too close to an object. Thanks to "KrutoyKolbas" for reporting.
1.8 (15-Feb-2021)
- Fixed not excluding the Molotov when "l4d_dynamic_light_guns" cvar was set to 1. Thanks to "HarryPotter" for fixing.
1.7 (05-Oct-2020)
- Added Traditional Chinese abd Simplified Chinese translations - Thanks to "HarryPotter".
- Fixed cvar "l4d_dynamic_light_hints" displaying hints when it shouldn't. Thanks to "HarryPotter" for reporting.
1.6 (05-Oct-2020)
- Added cvar "l4d_dynamic_light_guns" to control if the light works on weapons only or everything.
1.5 (30-Sep-2020)
- Fixed compile errors on SM 1.11.
- Fixed rare "OnPlayerRunCmd" throwing client "not connected" or "not in game" errors.
1.4 (10-May-2020)
- Extra checks to prevent "IsAllowedGameMode" throwing errors.
- Fixed Cola Bottles not blocking the light.
- Fixed not setting the default on/off state when a client connects.
- Various changes to tidy up code.
1.3 (01-Apr-2020)
- Fixed "IsAllowedGameMode" from throwing errors when the "_tog" cvar was changed before MapStart.
1.2 (05-May-2018)
- Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
- Changed cvar "l4d_dynamic_light_hide" to use value 2 = Only show to the owner.
- Changed cvar "l4d_dynamic_light_modes_tog" now supports L4D1.
- Removed instructor hints due to Valve: FCVAR_SERVER_CAN_EXECUTE prevented server running command: gameinstructor_enable.
1.1 (15-Jun-2012)
- Added German translations - Thanks to "Don't Fear The Reaper".
- Fixed the light not being teleported with the cvar "l4d_dynamic_light_fade" set to 0.
1.0 (15-May-2012)
- Initial release.
Updating from 1.5 or older:- New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.
Installation:- Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
- Download "translations_dynamic_light.zip" and extract the "translations" folder to your servers \addons\sourcemod\ folder.
Current Translations: English (en), German (de), Russian (ru), Simplified Chinese (zho), Traditional Chinese (chi).