Rules FAQ Members List Search Register Login

 Raised This Month: $89 Target:$400 22%

Author
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
 Plugin ID: 2753 Plugin Version: 2.5 Plugin Category: Gameplay Plugin Game: Left 4 Dead Plugin Dependencies: Servers with this Plugin: Plugin Description: Converts the grenade launcher into a flare gun amongst other types.
01-01-2012 , 16:08   [L4D2] Flare Gun (2.5) [27-May-2012]
#1

• Converts the Grenade Launcher into 1 of 8 types and provides a menu to select the type. Projectiles can ignite infected/players/explosives.
• This plugin was originally part of the Flare and Light Package. I have seperated the Flare, Flashlight and Flare Gun into new plugins.

Thanks:
• SilentBr - for the idea and request.
• Mr.RuyC - For recording a video of the first version and playing for hours and hours testing the plugin on his server.
• nakashimakun - Who came up with the plugin name and the clientprefs code for !flaregun. Also testing the plugin on their server.
• honorcode23, DJ_WEST, AtomicStryker, Boikinov, pimpinjuice and FoxMulder for source code (full credits inside the source).
• Downtown1, ProdigySim and psychonic - For "[EXTENSION] Left 4 Downtown 2" gamedata to stumble players.
• januto - Lots of testing on their server, Spanish translations and the idea for the Sensor type.
• [Resistance] Yoshi - Lots of help testing and ideas about balancing.
• disawar1 - For Russian translations.
• januto - For Spanish translations.
• Dont Fear The Reaper - For German translations.
• NanX, japan555, CeeJ, Farmer, SilentBr, sapphire989, Visual77, Mr. Man, disawar1, alexip121093, xioSlayer and everyone else who helped testing, it's been fun!

Types:

Default explosion with no effects. The speed and gravity is affected by this plugins cvar.

Flare (stock explosion):
As above but with Flare and Light effects.

Sticky Flare (no explosion):
Flare projectile which sticks to world surfaces and illuminates the area.

Bounce (ignites, no explosion):
Projectile which bounces and sets explosives/infected/special infected/survivors on fire.

Jump Launcher:
Flare projectiles which stick to world surfaces. Players who jump over their own projectiles and shove (right click) will be teleported away. Players are limited to 3 shots which multiply the force.

Remote (right click):
The Remote bomb sticks to world surfaces and explodes when the owner shoves (right clicks).

Sensor Bomb:
These proximity bombs stick to world surfaces and explode when common or special infected walk near.

Timed Bomb:
Flare projectiles stick to world surfaces and explode after time set by l4d2_flare_gun_time_timed.

Details:
• Non-admins can be limited to which types are allowed by setting the cvar: l4d2_flare_gun_types.
• Total shot projectiles are limited to 16 for admins. Total projectiles limited by l4d2_flare_gun_max_total. Non-admins are limited by l4d2_flare_gun_max.
• When the maximum cvar is reached, projectiles which are shot will be deleted and the Grenade Launcher reloaded.
• The plugin also checks the command access overrides for 'sm_flaregun' to allow/disallow the menu to players.
• The projectile speed and gravity can be changed. Negative gravity values will make the projectile fly up and negative speed values will make the projectile fly in the opposite direction from where it was shot.
• Damage from the Jump, Remote, Sensor and Timed explosions is applied in a radius set by l4d2_flare_gun_distance. The further away someone is the less damage is applied.
• The Sensor type has a set trigger radius. To change you must edit the source and replace "models/props/cs_assault/box_stack2.mdl" with a new model of different size.
• Projectiles can ignite players/special infected/explosives when they touch. Damage is applied twice a second on multiple touches and can be controlled by l4d2_flare_gun_hurt and for special infected l4d2_flare_gun_hurt_infected.

Player commands:

PHP Code:
 sm_flaregun // Opens the Flare Gun menu to select different types.  

CVars:

PHP Code:
 // 0=Plugin off, 1=Plugin on. l4d2_flare_gun_allow "1" // 0=Unlimited ammo, 1=Default ammo, else how many grenades are given in Grenade Launchers. l4d2_flare_gun_ammo "1" // 0=Off, 1=Display the !flaregun menu when players first pickup Grenade Launchers. l4d2_flare_gun_auto_menu "1" // Scales friendly fire damage to other players. l4d2_flare_gun_damage_ff_scale "0.15" // Scales friendly fire damage to yourself. l4d2_flare_gun_damage_ff_self "0.15" // Maximum damage the Homing Rocket explosions can cause. l4d2_flare_gun_damage_homing "75.0" // Maximum damage the Jump explosions can cause. l4d2_flare_gun_damage_jump "50.0" // Maximum damage the Remote Bomb explosions can cause. l4d2_flare_gun_damage_remote "75.0" // Maximum damage the Sensor Bomb explosions can cause. l4d2_flare_gun_damage_sensor "75.0" // Maximum damage the Timed explosions can cause. l4d2_flare_gun_damage_timed "75.0" // How far can the explosions cause damage. l4d2_flare_gun_distance "250.0" // Changes the projectile bounciness. Valve default: 1.0. l4d2_flare_gun_elasticity "1.0" // How much force is applied to the Jump type. l4d2_flare_gun_force "600.0" // 0=Off, When using the jump type: 1=Prevent Ledge Grab, 2=Prevent fall damage, 3=Both. l4d2_flare_gun_god "3" // Changes the projectile gravity, negative numbers make it fly upwards! l4d2_flare_gun_gravity "0.4" // 0=Off, Hurt survivors this much and ignite zombies/infected/explosives when bouncing. This enables l4d2_flare_gun_hurt_special. l4d2_flare_gun_hurt "10" // Hurt special infected this much when they touch the flare. Damage is limited to once per second, same as above. l4d2_flare_gun_hurt_special "10" // Stumble survivors/special infected in explosions (does not affect stock types). l4d2_flare_gun_hurt_stumble "1" // Turn on/off the attached light_dynamic glow. l4d2_flare_gun_light "1" // The light color. Three values between 0-255 separated by spaces. RGB Color255 - Red Green Blue. l4d2_flare_gun_light_color "200 20 15" // Max simultaneous flares a player can shoot. l4d2_flare_gun_max "3" // Limit the total number of simultaneous grenade flares to this many. l4d2_flare_gun_max_total "16" // Players with these flags have access to flare gun type menu. (Empty = All). l4d2_flare_gun_menu "" // Players with these flags have access to all the flare gun types in the menu. l4d2_flare_gun_menu_admin "z" // Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all). l4d2_flare_gun_modes "" // Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none). l4d2_flare_gun_modes_off "" // Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together. l4d2_flare_gun_modes_tog "0" // 0=No reloading, quick shooting, 1=Default reloading after 1 shot. l4d2_flare_gun_reload "1" // 0=Off, 1=Turn on the attached firework particle effect. l4d2_flare_gun_sparks "1" // The grenade launcher projectile speed. l4d2_flare_gun_speed "1000" // The homing rocket projectile speed. l4d2_flare_gun_speed_homing "400" // 0=Off, 1=The Sacrifice flare smoke, 2=Flare smoke but RPG smoke on Bounce type. l4d2_flare_gun_smoke "1" // Turn on/off the attached glowing sprite. l4d2_flare_gun_sprite "1" // Set the glowing sprite color. Three values between 0-255 separated by spaces. RGB Color255 - Red Green Blue. l4d2_flare_gun_sprite_color "200 20 15" // How many seconds before removing Bounce projectiles. l4d2_flare_gun_time_bounce "10.0" // How many seconds before removing Homing Rockets (explodes on time up). l4d2_flare_gun_time_homing "10.0" // How many seconds before removing Jump projectiles. l4d2_flare_gun_time_jump "60.0" // How many seconds before removing Remote Bomb projectiles. l4d2_flare_gun_time_remote "60.0" // How many seconds before removing Sensor projectiles. l4d2_flare_gun_time_sensor "30.0" // How many seconds before removing Sticky Flare projectiles. l4d2_flare_gun_time_sticky "20.0" // How many seconds before removing Timed projectiles. l4d2_flare_gun_time_timed "5.0" // Which types can players use (admins can use all). 1=Stock, 2=Flare, 4=Bounce, 8=Sticky Flare, 16=Jump, 32=Remote Bomb, 64=Sticky Bomb Timed, 128=Sensor Bomb, 256=Homing Rocket, 511=All. l4d2_flare_gun_types "239" // The default type of grenade launcher new players receive. Same as types but only use 1 value, do not add up. l4d2_flare_gun_type_default "2" // Flare Gun plugin version. l4d2_flare_gun_version  

Changes:

Code:
2.5 (06-Jul-2013)
- Gamedata signatures file updated. No other changes.

2.5 (27-May-2012)
- Fixed the damage cvars not applying full damage to special infected - Thanks to "disawar1" for bug report.

2.4 (25-May-2012)
- Fixed the Timed Bomb type not following the damage cvar settings.
- Fixed the Homing Type breaking the total number of projectiles.

2.3 (20-May-2012)
- Fixed errors reported by "Dont Fear The Reaper".
- New gamedata "l4d2_flare_gun.txt" file required.
- The cvar "l4d2_flare_gun_hurt_stumble" now stumbles survivors and infected away from the explosion origin.

2.2 (10-May-2012)
- Added "Homing" type to direct the projectile movement.
- Added cvar "l4d2_flare_gun_modes_off" to control which game modes the plugin works in.
- Added cvar "l4d2_flare_gun_modes_tog" same as above.
- Added cvar "l4d2_flare_gun_god" to prevent ledge grab and fall damage when using the Jump type.
- Added cvar "l4d2_flare_gun_damage_homing" to control the Homing Rocket explosion damage.
- Added cvar "l4d2_flare_gun_time_homing" to control how long the Homing Rocket lasts.
- Added cvar "l4d2_flare_gun_speed_homing" to control how fast Homing Rockets travel.
- Prevents shooting the Grenade Launcher when limiting the number of projectiles.
- Should no longer explode when using a sticky type too close to a wall.
- Small changes and fixes.

2.1 (11-Jan-2012)
- Fixed a bug in the menu which gave the wrong Flare Gun type to non-admins.
- Increased a string size to better support translations.

2.0 (01-Jan-2012)
- Plugin separated and taken from the "Flare and Light Package" plugin.
- Added Jump type which launches players into the air.
- Added Remote type which sticks and detonates when players right click (shove).
- Added Sensor Bomb type which detonates when infected or special infected go near.
- Added Sticky type which sticks and has no explosion.
- Added Timed bombs which detonate after l4d2_flare_gun_time_timed
- Added and changed many cvars.
- Changed the command "sm_flaregun" to show players a menu of Grenade Launcher types.
- Changed the cvar "l4d2_flare_gun_type", add the numbers together to choose allowed Grenade Launcher types for non-admins.
- Changed cvar "l4d2_flare_gun_max" to limit how many simultaneous flares players are allowed. (Admins limited by cvar below).
- Added cvar "l4d2_flare_gun_max_total" to limit the total amount of flares at one time.
- Projectiles which have been shot after the max limits will be removed.
- Removed cvar "l4d2_flare_gun_bounce".
- Removed cvar "l4d2_flare_gun_time".

1.0.3 (10-Mar-2012)
- Added "l4d2_flare_gun_bounce 3" to make grenade launcher projectiles stick to surfaces.
- Added "l4d2_flare_gun_bounce 4" to do the same as above and explode after "l4d2_flare_gun_time".
- Added a new cvar to change the grenade launcher projectile bounciness (l4d2_flare_gun_elasticity).

1.0.2 (30-Jan-2012)
- Fixed the Flare Gun hint text displaying when the game mode is disallowed.

1.0.1 (29-Jan-2012)
- Fixed Flare Gun hint text displaying when Flare Gun is off.
- Change the default Flare Gun Speed (l4d2_flare_gun_speed) cvar from 600 to 1000.

1.0 (29-Jan-2011)
- Initial release.

Compiling:
3. Put the plugins .sp file into your scripting folder and compile the plugin.

Requirements:
• This plugin requires the SDKHooks extension, which is now part of SourceMod 1.5+ and not required as a separate download.

Installation:

Updating from 2.1 or older:
• New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.

Current Translations: English (en), German (de), Russian (ru), Spanish (es).
Attached Files
 l4d2_flare_gun.zip (50.4 KB, 1761 views)
__________________

Last edited by Silvers; 11-14-2015 at 07:19.
januto
Member
Join Date: Mar 2011
 01-02-2012 , 06:20   Re: [L4D2] Flare Gun (2.0) [01-Jan-2012] #2 There you go! My +5, awesomeness is part of your work __________________ You are welcome!
disawar1
Senior Member
Join Date: Aug 2011
Location: Russian
 01-05-2012 , 00:35   Re: [L4D2] Flare Gun (2.0) [01-Jan-2012] #3 Ru translations is here, silver when come new update do not forget to change source line - 744, 748 to [256] symbol. Otherwise, you know UTF-8 encoding takes up more space and message will not be seen :/ - Idea! do you have the time to add firework? __________________ My plugins on: Sourcemod, GitHub, Bitbucket, Google Wanna private plugin? I'm ready to get to work, contact me Last edited by disawar1; 01-12-2012 at 02:49. Reason: delete flaregun.phrases.txt -> silver get it
Chronic1
SourceMod Donor
Join Date: Jun 2011
 01-09-2012 , 01:30   Re: [L4D2] Flare Gun (2.0) [01-Jan-2012] #4 Can you fix the jump launcher so players dont have godmode for more than 3 seconds? After I do the jump i had godmode for like 30 seconds. __________________
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
 01-09-2012 , 02:42   Re: [L4D2] Flare Gun (2.0) [01-Jan-2012] #5 The godmode should should only last within 1 frame. Please check your error logs in case something interrupted the process. __________________ [My Plugins] ANY: Cvar Configs Updater L4D1/2: Flamethrower|Gear Transfer|Hats|Plane Crash L4D2: Airstrike|Crawling|Fireworks|Flare Gun|Mutants|Pour Gas|Weather Control
Chronic1
SourceMod Donor
Join Date: Jun 2011
 01-09-2012 , 11:43   Re: [L4D2] Flare Gun (2.0) [01-Jan-2012] #6 I see nothing in my error logs from yesterday that would interrupt the process. I set this in my config... // Scales friendly fire damage to yourself. // - // Default: "0.15" l4d2_flare_gun_damage_ff_self "0.0" // Maximum damage the Jump explosions can cause. // - // Default: "100.0" l4d2_flare_gun_damage_jump "10.0" // How much force is applied to the Jump type. // - // Default: "600.0" l4d2_flare_gun_force "900.0" // 0=Off, 1=The Sacrifice flare smoke, 2=Flare smoke but RPG smoke on Bounce type. // - // Default: "2" // Minimum: "0.000000" // Maximum: "2.000000" l4d2_flare_gun_smoke "1" __________________
disawar1
Senior Member
Join Date: Aug 2011
Location: Russian
 01-10-2012 , 00:05   Re: [L4D2] Flare Gun (2.0) [01-Jan-2012] #7 sometimes when sensor bomb explodes It has caused great damage and you find yourself on the floor, i think plugin conflict anyone have this issues? __________________ My plugins on: Sourcemod, GitHub, Bitbucket, Google Wanna private plugin? I'm ready to get to work, contact me
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
01-10-2012 , 04:28   Re: [L4D2] Flare Gun (2.0) [01-Jan-2012]
#8

Quote:
 Originally Posted by Chronic1 I see nothing in my error logs from yesterday that would interrupt the process. I set this in my config...
Well you won't be causing damage to yourself because of this:
l4d2_flare_gun_damage_ff_self "0.0"

Quote:
 Originally Posted by disawar1 sometimes when sensor bomb explodes It has caused great damage and you find yourself on the floor, i think plugin conflict anyone have this issues?
We worked out the plugin conflict was: "Block Rocket Jump Exploit".
__________________
sojin
Junior Member
Join Date: Apr 2009
 01-10-2012 , 12:27   Re: [L4D2] Flare Gun (2.0) [01-Jan-2012] #9 If I just use some of these types, the launchers that I selected and when i shoot are different. For example, I selected remote bomb, but when I shot it was sensor bomb. If I don't remove anything, everything works fine. Last edited by sojin; 01-10-2012 at 22:28.
Chronic1
SourceMod Donor
Join Date: Jun 2011
 01-10-2012 , 13:29   Re: [L4D2] Flare Gun (2.0) [01-Jan-2012] #10 ah thanks silvers. I thought that command was only for the exploding grenade damage. __________________

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Server Discussion     Source Servers (SRCDS)     HL1 Servers (HLDS) AMX Mod X     News     Bug Reports     General     Off-Topic     Plugins         Suggestions / Requests         Approved Plugins         New Plugin Submissions         Unapproved/Old Plugins         Translation Request         High-Traffic Plugins             GunGame             UAIO (Ultimate All-In-One Plugin)             xREDIRECT             CSDM             AMX Super             RuneMod             Zombie Plague Mod             SuperHero Mod                 News                 Tech Support                 Scripting Help                 Off-Topic / General Chat                 Heroes                     Suggestions / Requests                     Approved Heroes                     New Submissions                     Unapproved/Old Heroes                         Module Heroes                     SuperHero Mod Stats - By 123                 (OLD) Bug Reports     Scripting         Scripting Help         Code Snippets/Tutorials         Module Coding     Donor Access SourceMod     News     General     Plugins         Plugins         Unapproved Plugins         Plugin/Gameplay Ideas and Requests         High-Traffic Plugins             SourceMod Anti-Cheat             Zombie:Reloaded             SourceBans             VSH / Freak Fortress             Store             SM_Hosties             HLstatsX:CE     Scripting     Extensions     Snippets and Tutorials     Donor Access     Metamod: Source         Metamod:Source Plugins         Metamod:Source Questions         Coding MM:S Plugins & SM Extensions Hosted Stuff     Asherkin's Plugins         TF2Items         TFDodgeball         SteamTools     Bail's Plugins         CSDM         CS:S DM Off-Topic & Trash     Off-Topic     Trash

All times are GMT -4. The time now is 17:39.

 DMCA - Archive - Top