Description
Just for fun.
This plugin adds a dumb hat for puked survivors (
hit by Boomer vomit).
Features
- Allow configuring the model/pos/angles/color/alpha of the hat.
- Allow configuring the glow color/type/range/flash for the hat. (L4D2 only)
- Allow configuring a white glow for the hat. (L4D1 only)
Preview
Cvars
A configuration file named "
l4d_dumb_hat.cfg" will automatically be created for you upon the first run in the "
\cfg\sourcemod\" folder.
PHP Code:
// Hat alpha transparency.
// 0 = Invisible, 255 = Fully Visible.
// -
// Default: "255"
// Minimum: "0.000000"
// Maximum: "255.000000"
l4d_dumb_hat_alpha "255"
// Hat angles relative to the eyes attachment.
// Use three values (000.00) separated by spaces ("<000.00> <000.00> <000.00>").
// -
// Default: "-15.00 0.00 -90.00"
l4d_dumb_hat_angles "-15.00 0.00 -90.00"
// Hat color.
// Use "random" for random colors.
// Use three values between 0-255 separated by spaces ("<0-255> <0-255> <0-255>").
// -
// Default: "255 255 255"
l4d_dumb_hat_color "255 255 255"
// Enable/Disable the plugin.
// 0 = Disable, 1 = Enable.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_dumb_hat_enable "1"
// Hat glow color.
// L4D2 only.
// Use "random" for random colors.
// Use three values between 0-255 separated by spaces ("<0-255> <0-255> <0-255>").
// -
// Default: "51 255 51"
l4d_dumb_hat_glow_color "51 255 51"
// Add a flashing effect to the hat.
// L4D2 only.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_dumb_hat_glow_flashing "1"
// Enable hat glow (white).
// L4D1 only.
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_dumb_hat_glow_l4d1 "1"
// Which teams should see the hat glowing.
// L4D1 only.
// 0 = NONE, 1 = SURVIVOR, 2 = INFECTED, 3 = BOTH.
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d_dumb_hat_glow_team_l4d1 "3"
// Maximum distance that the client can be away from the hat to start glowing.
// L4D2 only.
// 0 = No maximum distance.
// -
// Default: "0"
// Minimum: "0.000000"
l4d_dumb_hat_glow_max_distance "0"
// Algorithm value to detect the glow minimum brightness for a random glow (not accurate).
// L4D2 only.
// -
// Default: "0.5"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_dumb_hat_glow_min_brightness "0.5"
// Minimum distance that the client must be from the hat to start glowing.
// L4D2 only.
// 0 = No minimum distance.
// -
// Default: "0"
// Minimum: "0.000000"
l4d_dumb_hat_glow_min_distance "0"
// Hat glow type.
// L4D2 only.
// 0 = OFF, 1 = OnUse (doesn't works), 2 = OnLookAt (doesn't works well for some entities), 3 = Constant (better results but visible through walls).
// -
// Default: "2"
// Minimum: "0.000000"
// Maximum: "3.000000"
l4d_dumb_hat_glow_type "2"
// Hat model.
// -
// Default: "models/editor/spot_cone.mdl"
l4d_dumb_hat_model "models/editor/spot_cone.mdl"
// Hat position relative to the eyes attachment.
// Use three values (000.00) separated by spaces ("<000.00> <000.00> <000.00>").
// -
// Default: "-8.00 0.00 18.00"
l4d_dumb_hat_pos "-8.00 0.00 18.00"
Related Game Cvars
- survivor_it_duration => How long survivors stay marked as "it" (vomit). (default: 20)
Admin Commands
- sm_dumbhat => Add a temporary dumb hat on self (no args) or specified targets. Survivors only. Example: self -> sm_dumbhat / target -> sm_dumbhat @bots (z flag required)
- sm_print_cvars_l4d_dumb_hat => Print the plugin related cvars and their respective values to the console. (z flag required)
Change Log
Notes
- The dumb hat is visible only for the others. (you can't see your own hat)
- The eyes attachment position but seems to be a bit different for some survivors, so it may not look align the same across all the survivors model.
- The original model is red, so not all colors may apply properly.
- The original model has different position/angles between L4D1 and L4D2.
To Do
- Add dumb hat to survivors that trigger witches but don't kill them.
- Add third person detection.
Thank you!
Related Plugins
Recommended Plugins
Post Reply
- Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.
Installation
- Put the "l4d_dumb_hat.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
- Recommended: Install the [L4D & L4D2] Use Priority Patch plugin to prevent blocking +USE.