L4D2 ONLY
Description
Adds glow to equipped items (visible by all teams) and restores the default glow config back on item drop.
The main idea was to give hints about items being carried on by survivors, giving more advantage to infected team on scavenge events.
Besides all settings only the weapons below are able to set some configs, like the glow color:
- Gascan
- Propane Canister
- Oxygen Tank
- Fireworks Crate
For the other items, it glows but only with the default (blue) glow and aren't affected by settings like flashing or color.
Features- Allow to add a glow to equipped items.
- Allow to set the glow type, color, flashing and range for some weapons.
- Allow configuring the glow brightness. (not accurate)
Preview
Cvars
A configuration file named "
l4d2_weapon_equipped_glow.cfg" will automatically be created for you upon the first run in the "
\cfg\sourcemod\" folder.
PHP Code:
// Enable/Disable the plugin.
// 0 = Disable, 1 = Enable.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_weapon_equip_glow_enable "1"
// Which types of gascan should be affected by the plugin.
// 0 = NONE, 1 = NORMAL, 2 = SCAVENGE, 3 = BOTH.
// Add numbers greater than 0 for multiple options.
// Example: "3", enables for NORMAL and SCAVENGE gascans.
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d2_weapon_equip_glow_gascan_type "3"
// Algorithm value to detect the glow minimum brightness for a random color (not accurate).
// -
// Default: "0.5"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d2_weapon_equip_glow_min_brightness "0.5"
Data file (data/l4d2_weapon_equipped_glow.cfg)
PHP Code:
// Attributes explained:
// "enable" -> Apply plugin glow to entity. "0" = Disable, "1" = Enable.
// "random" -> Apply a random glow color. "0" = OFF, "1" = ON.
// "color" -> Item glow color. Use three values between 0-255 separated by spaces. "<0-255> <0-255> <0-255>", e.g: "255 255 255". Ignored when "random" is "1".
// "flashing" -> Add a flashing effect on glowing entities. "0" = OFF, "1" = ON.
// "type" -> Glow type. "0" = OFF, "1" = OnUse (doesn't works), "2" = OnLookAt (doesn't works well for some entities), "3" = Constant (better results but visible through walls).
// "rangemin" -> Minimum distance that the client must be from the entity to start glowing. "0" = No minimum distance.
// "rangemax -> Maximum distance that the client can be away from the entity to start glowing. "0" = No maximum distance.
"l4d2_weapon_equipped_glow"
{
"default"
{
"enable" "0"
"random" "0"
"color" "255 255 255"
"flashing" "0"
"type" "3"
"rangemin" "0"
"rangemax" "0"
}
"classnames"
{
// Carryables
"weapon_gascan"
{
"enable" "1"
"color" "255 0 0"
}
"weapon_propanetank"
{
"enable" "1"
"color" "255 0 0"
}
"weapon_oxygentank"
{
"enable" "1"
"color" "255 0 0"
}
"weapon_fireworkcrate"
{
"enable" "1"
"color" "255 0 0"
}
// Note:
// All weapons below only glow in the default color and aren't affected by any other config (game-design)
"weapon_gnome"
{
"enable" "1"
}
"weapon_cola_bottles"
{
"enable" "1"
}
// Primary Weapons - Slot 1
// Tier 1
// SMGs
"weapon_smg"
{
"enable" "0"
}
"weapon_smg_silenced"
{
"enable" "0"
}
"weapon_smg_mp5"
{
"enable" "0"
}
// Shotguns
"weapon_pumpshotgun"
{
"enable" "0"
}
"weapon_shotgun_chrome"
{
"enable" "0"
}
// Tier 2
// Rifles
"weapon_rifle"
{
"enable" "0"
}
"weapon_rifle_desert"
{
"enable" "0"
}
"weapon_rifle_ak47"
{
"enable" "0"
}
"weapon_rifle_sg552"
{
"enable" "0"
}
// Shotguns
"weapon_autoshotgun"
{
"enable" "0"
}
"weapon_shotgun_spas"
{
"enable" "0"
}
// Snipers
"weapon_hunting_rifle"
{
"enable" "0"
}
"weapon_sniper_military"
{
"enable" "0"
}
"weapon_sniper_scout"
{
"enable" "0"
}
"weapon_sniper_awp"
{
"enable" "0"
}
// Tier 3
"weapon_rifle_m60"
{
"enable" "0"
}
"weapon_grenade_launcher"
{
"enable" "0"
}
// Secondary Weapons - Slot 2
// Pistols
"weapon_pistol"
{
"enable" "0"
}
"weapon_pistol_magnum"
{
"enable" "0"
}
// Throwables - Slot 3
"weapon_molotov"
{
"enable" "0"
}
"weapon_pipe_bomb"
{
"enable" "0"
}
"weapon_vomitjar"
{
"enable" "0"
}
// Upgrade Packs - Slot 4
"weapon_upgradepack_explosive"
{
"enable" "0"
}
"weapon_upgradepack_incendiary"
{
"enable" "0"
}
// Health Items - Slot 4
"weapon_first_aid_kit"
{
"enable" "0"
}
"weapon_defibrillator"
{
"enable" "0"
}
// Health Items - Slot 5
"weapon_pain_pills"
{
"enable" "0"
}
"weapon_adrenaline"
{
"enable" "0"
}
// Melees - Slot 2
"weapon_chainsaw"
{
"enable" "0"
}
"weapon_melee"
{
"enable" "0"
}
}
// "weapon_melee" must be "enabled" set to "1"
"melees"
{
"fireaxe"
{
"enable" "0"
}
"frying_pan"
{
"enable" "0"
}
"machete"
{
"enable" "0"
}
"baseball_bat"
{
"enable" "0"
}
"crowbar"
{
"enable" "0"
}
"cricket_bat"
{
"enable" "0"
}
"tonfa"
{
"enable" "0"
}
"katana"
{
"enable" "0"
}
"electric_guitar"
{
"enable" "0"
}
"knife"
{
"enable" "0"
}
"golfclub"
{
"enable" "0"
}
"pitchfork"
{
"enable" "0"
}
"shovel"
{
"enable" "0"
}
"riotshield"
{
"enable" "0"
}
}
}
Admin Commands
- sm_glowequipreload => Reload the glow equip configs. (z flag required)
- sm_print_cvars_l4d2_weapon_equipped_glow => Print the plugin related cvars and their respective values to the console. (z flag required)
Change Log
Notes
- When the weapon is not able to change some configs it will behave like a default glow (blue).
- The glow is not visible to the owner, you are only able to see the weapon glow from other clients.
Related Plugins
Post Reply
- Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.
Installation
- Put the "l4d2_weapon_equipped_glow.cfg" file in your "\addons\sourcemod\data\" folder.
- Put the "l4d2_weapon_equipped_glow.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.