Introduction
This Plugin was originally developed in a response that Adrenaline should have more than just having faster channeling times, no melee cooldowns, etc.
Originally developed over
here, I was still learning how to script efficiently. But some personal issues cropped up in my life that led me to unable to lead a good first impression (Not to mention a challenge to figure out how to reformat that page too!).
Now that I have somewhat learned how to script a little bit better, I decided to expand over on this plugin and hopefully impress you guys once again.
Descriptions (and features)
- Using the Adrenaline guarentees faster reloading, weapon firing, and melee swinging rates
- Using the Pain Pills grants the boosts on a probability scale (customizable)
- Multiple ConVars to tweek to any server needs
Installation
- Click on the
Get Plugin at the bottom of the post and place 'l4d(2)_powerups_rush.smx' into your ...addons\sourcemod\plugins directory
- Alternatively, you can also click on the
Get Source at the bottom of the post and compile it yourself
Admin Commands
sm_giveadren - Give Adrenaline to everybody
sm_givepills - Give Pain Pills to everybody
sm_giverandom - Give either Adrenaline or Pain Pills to everybody
ConVars (Edit most configurations in your ...cfg\sourcemod\l4d2_powerups_rush.cfg directory)
l4d_powerups_rush_version - 2.0.1
The version of the Power Ups Plugin
l4d_powerups_plugin_on - 1
Is the Plugin active? (1 = ON 0 = OFF)
l4d_powerups_broadcast_on - 1
Should players be notified when connecting to the server about the powerups? (1 = ON 0 = OFF)
l4d_powerups_broadcast_type - 1
How are players notified? (0 = CHAT 1 = HINT 2 = BOTH)
l4d_powerups_use_on - 1
Should players use adrenaline (or pills) to get super reload, weapon firing, and melee swings? (1 = ON 0 = OFF)
l4d_powerups_adren_give_on - 0
Should players be given adrenaline at round start? (1 = ON 0 = OFF)
l4d_powerups_pills_give_on - 0
Should players be given pills at round start? (1 = ON 0 = OFF)
l4d_powerups_random_give_on - 0
Should players be given either adrenaline or pills at round start? (1 = ON 0 = OFF)
l4d_powerups_duration - 20
How long should the duration of the boosts last?
l4d_powerups_pills_luck - 3
The luck factor for swallowing pills that will grant the boost(s). (1 = 1/1 2 = 1/2 3 = 1/3 4 = 1/4 etc.)
l4d_powerups_weaponreload_rate - 0.5714
The interval incurred by reloading is multiplied by this value (clamped between 0.2 < 0.9)
l4d_powerups_weaponmelee_rate - 0.45
The interval for swinging melee weapon (clamped between 0.3 < 0.9)
l4d_powerups_weaponfiring_rate - 0.6667
The interval between bullets fired is multiplied by this value. WARNING: a short enough interval will make SMGs' and rifles' firing accuracy distorted (clamped between 0.2 < 0.9)
To Do
*Find a better thread title?
*Find better wordings for this thread
*Clean up my coding (about 75% done)
*Add support for which catagory Adrenaline (or Pills) affects
(At the moment, it toggles all 3...)
*Add support for L4D1?
*Bug reports that anyone gives
Credits
tPoncho - Huge props for the fast reload, weapon firing, and melee swing codes
hihi1210 - for the formula for multiple melee swings (Version 1.5)
AlliedModders Wiki - for all the references
Testers - of this Plugin
dirka dirka - for fixing the tag mismatches
Changelog
Code:
2.0.0
*Renamed file name from l4d2_adren_reload to l4d(2)_powerups_rush
*Renamed more various handles, floats, etc.
*Added support for faster melee swings
*Added ConVar for melee swing rates
*Added support for faster weapon firing speeds
*Added ConVar for weapon firing rates
*Added support for pills
*Added ConVar to toggle what are the odds you will get the boosts
*Added support for giving Pain Pills at round start
*Added an Admin command 'sm_givepills' to give everybody Pain Pills, anytime
(Requires CHEATS flag)
Added support for giving either Adrenaline or Pain Pills at round start
*Added an Admin command 'sm_giverandom' to give everybody either Adrenaline or Pain Pills, anytime
(Requires CHEATS flag)
2.0.1
*Fixed the Tag Mismatches
(Thanks 'dirka dirka')!
*Added a URL in plugin information
*Changed the default 'l4d_powerups_weaponmelee_rate' from 0.5 to 0.45
The rest of the changelog can be found in the source code.