Raised This Month: $80 Target: $400
 20% 

[L4D & L4D2] Flare and Light Package (1.0.3) [10-Mar-2011]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
2195
Plugin Version:
1.0.3
Plugin Category:
Fun Stuff
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Creates flares like those from The Sacrifice, either by command or automatically when incapped. Attaches a flashlight to survivors. Converts grenade launcher into a flare gun.
    Unapprover:
    Reason for Unapproving:
    Author request
    Old 01-28-2011 , 23:53   [L4D & L4D2] Flare and Light Package (1.0.3) [10-Mar-2011]
    Reply With Quote #1

    UPDATE!!!
    NEW VERSIONS OF FLARE, FLASHLIGHT AND FLARE GUN HERE




    • Basically creates flares like those from The Sacrifice. On the ground or attached to players, either automatically when incapped or by player commands.
    • Attaches a flashlight model to survivors which can be turned on/off.
    • Converts the Grenade Launcher (L4D2 only) into a flare gun which can ignite entities and gives the shooter credit for kills etc.




    Details:

    • Root admins can drop a max of 16 simultaneous flares (up to 32 marked by l4d_flare_max_admin cvar), everyone else limited to 1.
    • Total flares limited to 32 including grenade launcher flares (l4d_flare_max_total).
    • The attached and ground flares play a burning sound (same one used for The Sacrifice flares)!
    • You can create a white light by specifying '-1 -1 -1', does anyone want a cvar to block this? It's maybe too bright.
    • The flare or flashlight colours can locked so players cannot change. Put the cvar l4d_flare_lock_colours to 1 and it will force the colours to what you specified in the config. (if anyone wants separate lock cvars for the (flashlight / ground flare / attached flare) please post a request here.
    • The grenade launcher flare gun speed and gravity can be controlled with cvars, negative numbers will make the projectile fly in the opposite direction from where it was shot and fly upwards respectively.
    • The flare gun can either explode like normal or bounce and ignite entities by changing the cvar l4d_flare_gun_bounce to 0 or 1 respectively.
    • Flare gun projectiles explode normally when maximum flares/flare gun projectiles reached.
    • Damage by the flare gun is applied maximum of twice a second on multiple touches and can be controlled by l4d_flare_gun_hurt and for special infected l4d_flare_gun_hurt_infected.
    • If l4d_flare_gun_bounce is set to 1 players will be given a choice to disable the flaregun by typing !flaregun or with the !settings command. Setting the cvar to 2 will force the flare to bounce.
    • The plugin also checks the command access overrides for 'sm_flare', 'sm_flareme' and 'sm_light' as well as providing cvars to control access flags.




    Thanks:

    • SilentBr - for the idea and request.
    • Mr.RuyC - For recording the videos below 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 tested the plugin on his server.
    • honorcode23, DJ_WEST, AtomicStryker, Boikinov, pimpinjuice and FoxMulder for source code (full credits inside the source).
    • NanX, japan555, CeeJ, Farmer, SilentBr, sapphire989, Visual77 and everyone else who helped testing, it's been fun!




    Screenshots and Videos:

    http://www.youtube.com/watch?v=s3Bx2fmOV0A

    [IMG]http://img706.**************/img706/8627/flarer.th.jpg[/IMG] [IMG]http://img810.**************/img810/2881/flares.th.jpg[/IMG] [IMG]http://img52.**************/img52/4278/flaret.th.jpg[/IMG] [IMG]http://img840.**************/img840/2860/flareu.th.jpg[/IMG] [IMG]http://img211.**************/img211/3734/flarev.th.jpg[/IMG] [IMG]http://img5.**************/img5/3269/flarew.th.jpg[/IMG]





    Player commands:

    Usage: <#user id|name> [R G B]
    Optional: 3 RGB values (-1 to 255) for light colour. The ground flare has an optional second set of RGB values to control extra smoke colour (env_steam) but if they are not specified the first set will be used.

    PHP Code:
    sm_flare    // Spawns a flare on the ground.
    sm_flareme  // Attach a flare to yourself.
    sm_light    // Toggle the attached flashlight.
    sm_flaregun // Toggle if the flare gun bounces or not (l4d_flare_gun_bounce 1 must be set), does not accept RGB values!. 




    Admin commands:


    Usage: Same as above.

    PHP Code:
    sm_flareclient // Attach a flare on specified player.
    sm_flareground // Drop a flare next to specified player.
    sm_lightclient // Turn on/off the flashlight on specified player. 



    Cvars:


    Saved to l4d_flare.cfg in your left4dead\cfg\sourcemod\ folder.

    PHP Code:
    // Attached flare
    l4d_flare_attach_cmd_allow    "2"         // 0=Disable sm_self command. 1=Incapped only (not admins). 2=Any time. // Minimum: "0.000000" Maximum: "2.000000"
    l4d_flare_attach_cmd_flags    ""          // Players with these flags may use the sm_flareme command. (Empty = all).
    l4d_flare_attach_fuse         "1"         // Adds the pipebomb fuse particles to the flare.
    l4d_flare_attach_light_allow  "1"         // 0=Off, 1=Attaches light_dynamic glow to the player.
    l4d_flare_attach_light_colour "200 20 15" // Defines the light colour. RGB (red, green, blue) values (0-255).
    l4d_flare_attach_stock        "1"         // 0=Off, 1=Adds The Sacrifice flare smoke particles.

    // Attached flashlight
    l4d_flare_flashlight_allow    "1"         // 0=Off, 1=Attaches a flashlight model and light_dynamic to each survivor.
    l4d_flare_flashlight_bright   "255.0"     // Brightness of the light <10-255> (changes Distance value) // Minimum: "10.000000" Maximum: "255.000000"
    l4d_flare_flashlight_colour   "200 20 15" // Defines the light colour. RGB (red, green, blue) values (0-255).
    l4d_flare_flashlight_flags    ""          // Players with these flags may use the sm_light command. (Empty = all).

    // Ground flare
    l4d_flare_ground_cmd_allow    "2"         // 0=Disable sm_flare command. 1=Incapped only (not admins). 2=Any time.
    l4d_flare_ground_cmd_flags    ""          // Players with these flags may use the sm_flare command. Empty = all.
    l4d_flare_ground_fuse         "1"         // Adds the pipebomb fuse particles to the flare.
    l4d_flare_ground_light_allow  "1"         // Light glow around flare. 0=Off, 1=light_dynamic, 2=point_spotlight. // Minimum: "0.000000" Maximum: "2.000000"
    l4d_flare_ground_light_bright "255"       // Brightness of the light <10-255>. // Minimum: "10.000000" Maximum: "255.000000"
    l4d_flare_ground_light_colour "200 20 15" // Defines the light colour. RGB (red, green, blue) values (0-255).
    l4d_flare_ground_smoke_allow  "0"         // 0=Off, 1=Adds extra smoke to the flare (env_steam).
    l4d_flare_ground_smoke_alpha  "60"        // Transparency of the extra smoke (10-255). // Minimum: "10.000000" Maximum: "255.000000"
    l4d_flare_ground_smoke_colour "200 20 15" // Defines the extra smoke colour. RGB values must be between 0-255.
    l4d_flare_ground_smoke_height "100"       // How tall the extra smoke should rise.
    l4d_flare_ground_stock        "1"         // 0=Off, 1=Adds The Sacrifice flare smoke particles.

    // Grenade Launcher flare gun
    l4d_flare_gun_allow           "1"         // 0=Off, 1=Converts the Grenade Launcher into a Flare Gun.
    l4d_flare_gun_bounce          "1"         // 0=Grenade launcher explosion, 1=Bounce and ignite stuff, 2=Forced bounce.
    l4d_flare_gun_gravity         "0.4"       // Changes the projectile gravity, negative numbers make it fly upwards!
    l4d_flare_gun_hurt            "15"        // 0=Off, Hurt survivors this much and ignite zombies/infected/explosives etc. Bounce cvar must be enabled. This enables the cvar below.
    l4d_flare_gun_hurt_infected   "30"        // Hurt special infected this much when they touch the flare. As with the above cvar, the damage is limited to twice a second on multiple touches.
    l4d_flare_gun_light           "1"         // Turn on/off the attached light_dynamic glow.
    l4d_flare_gun_light_colour    "200 20 15" // Defines the extra light colour. RGB values must be between 0-255.
    l4d_flare_gun_max             "8"         // Limit the total number of simultaneous grenade flares to this many. // Minimum: "1.000000" Maximum: "8.000000"
    l4d_flare_gun_sparks          "1"         // Turn on/off the attached firework particle effect.
    l4d_flare_gun_speed           "600"       // Changes the grenade launcher projectile speed (Valve's default: 1600).
    l4d_flare_gun_smoke           "1"         // 0=Off, 1=The Sacrifice flare smoke, 2=Attach RPG smoke (FPS intensive). // Minimum: "1.000000" Maximum: "2.000000"
    l4d_flare_gun_sprite          "1"         // Turn on/off the attached glowing sprite.
    l4d_flare_gun_sprite_colour   "200 20 15" // Set the glowing sprite colour.
    l4d_flare_gun_time            "10.0"      // How many seconds should the grenade launcher projectile flare burn for.

    // Other plugin cvars
    l4d_flare_incapped            "1"         // Display flare when incapped. 0=Off, 1=On ground, 2=Attach to player.
    l4d_flare_intro               "35.0"      // 0=Off, Show intro message in chat this many seconds after joining. // Minimum: "0.000000" Maximum: "120.000000"
    l4d_flare_lock_colours        "0"         // 0=Let players edit light/smoke colours, 1=Force to cvar specified.
    l4d_flare_max_admin           "16"        // Allow root admins to spawn this many max ground flares. // Minimum: "1.000000" Maximum: "32.000000"
    l4d_flare_max_total           "32"        // Limit the total number of simultaneous flares. // Minimum: "1.000000" Maximum: "32.000000"
    l4d_flare_modes               "coop,realism" // Enable plugin on these gamemodes, separate by commas. (Empty = all)
    l4d_flare_notify              "1"         // 0=Off, 1=Print hints to chat (requires translation file provided).
    l4d_flare_on                  "1"         // 0=Plugin off, 1=Plugin on.
    l4d_flare_time                "10.0"      // How long the flares should burn, blocks non-admins making flares also. // Minimum: "1.000000" Maximum: "120.000000"
    l4d_flare_version                         // Flare plugin version. 




    Change log:


    Code:
    1.0.3
        - Added "l4d_flare_gun_bounce 3" to make grenade launcher projectiles stick to surfaces.
        - Added "l4d_flare_gun_bounce 4" to do the same as above and explode after "l4d_flare_gun_time".
        - Added a new cvar to change the grenade launcher projectile bounciness (l4d_flare_gun_elasticity).
    
    1.0.2
        - Fixed the Flare Gun hint text displaying when the game mode is disallowed.
    
    1.0.1
        - Fixed Flare Gun hint text displaying when Flare Gun is off.
        - Change the default Flare Gun Speed (l4d_flare_gun_speed) cvar from 600 to 1000.
    
    1.0
        - Initial release.




    Requirements:


    • This plugin requires the SDKHooks extension.



    Installation:
    DO NOT click 'Get Plugin' or it will fail to compile because this plugin requires SDKHooks and colors.inc!
    1. Download the .zip and extract the files to their respective folders within your \addons\sourcemod\ folder.
    2. The "flare.phrases.txt" translation file is required, if you don't know it goes in this folder: \addons\sourcemod\translations



    Compiling:

    1. You will need to put the SDKHooks include into your scripting\include folder. Don't forget to update the gamedata.txt!
    2. You will need the colors.inc in your scripting\include folder.
    3. Put this plugins .sp file in your scripting folder and compile!
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_flare.sp - 683 views - 77.1 KB)
    File Type: zip l4d_flare.zip (53.8 KB, 1797 views)
    __________________

    Last edited by Silvers; 01-01-2012 at 17:25.
    Silvers is offline
    SilentBr
    Veteran Member
    Join Date: Jan 2009
    Old 01-29-2011 , 00:09   Re: [L4D & L4D2] Flare and Light Package (1.0) [29-Jan-2011]
    Reply With Quote #2

    Hi Silvers

    Finally, the plugin is ready, I was so anxious. Glad to have helped. Plugin pretty cool and will be perfect in my 16 COOP, no bugs or errors ;)

    Thanks for your excellent work.
    SilentBr is offline
    DarkSynergy
    Member
    Join Date: Jan 2011
    Old 01-29-2011 , 00:34   Re: [L4D & L4D2] Flare and Light Package (1.0) [29-Jan-2011]
    Reply With Quote #3

    Would it be possible to add a feature to allow players to throw flares (projectile flares without replacing the grenade launcher)? I like the bouncing flares, but I still want to be able to use a normal grenade launcher.
    DarkSynergy is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 01-29-2011 , 00:48   Re: [L4D & L4D2] Flare and Light Package (1.0) [29-Jan-2011]
    Reply With Quote #4

    Thanks SilentBr! Enjoy

    DarkSynergy: I have given throwable projectiles a lot of thought since I first starting writing this plugin. It would be fun for sure but currently I have no plans to add.

    I mainly want to focus on bugs and maybe small requests, however this is one of the features I would most likely add in the future.
    __________________
    Silvers is offline
    sapphire989
    Member
    Join Date: Oct 2010
    Old 01-29-2011 , 05:40   Re: [L4D & L4D2] Flare and Light Package (1.0) [29-Jan-2011]
    Reply With Quote #5

    you finally launch version 1.0

    New weapons, nice

    Last edited by sapphire989; 01-29-2011 at 05:44.
    sapphire989 is offline
    siangc
    Senior Member
    Join Date: Mar 2010
    Old 01-29-2011 , 07:00   Re: [L4D & L4D2] Flare and Light Package (1.0) [29-Jan-2011]
    Reply With Quote #6

    Man this is cool.. good job!
    __________________
    siangc is offline
    kwski43
    Senior Member
    Join Date: Mar 2009
    Old 01-29-2011 , 09:54   Re: [L4D & L4D2] Flare and Light Package (1.0) [29-Jan-2011]
    Reply With Quote #7

    Whats the point of having ingame message with flaregun bounce when l4d_flare_gun_allow "0"?
    I've changed the following lines to disable this message.
    1784
    PHP Code:
    if( !g_bLeft4Dead && g_iGunBounce == && g_hGunAllow == 1
    1812
    PHP Code:
    if( !g_bLeft4Dead && g_iGunBounce == && !g_bDisplayed[client] && GetClientTeam(client) == && g_hGunAllow == 1
    and thanks for the great plugin !
    __________________
    kwski43 is offline
    alexip121093
    Senior Member
    Join Date: Dec 2009
    Location: Hong Kong
    Old 01-29-2011 , 11:18   Re: [L4D & L4D2] Flare and Light Package (1.0) [29-Jan-2011]
    Reply With Quote #8

    it will not remove the ground flare model after it burns,can you remove it too (maybe add a cvar)?
    And also allow unlimited flare burning time
    And remove the cvar limitations (maxium limit)
    __________________

    Last edited by alexip121093; 01-29-2011 at 11:25.
    alexip121093 is offline
    Send a message via MSN to alexip121093
    Elektramode
    Senior Member
    Join Date: Mar 2010
    Old 01-29-2011 , 11:30   Re: [L4D & L4D2] Flare and Light Package (1.0) [29-Jan-2011]
    Reply With Quote #9

    I have not tried it yet but I see it conflicts with the gear transfer plugin, I seem to get this error.

    01/29/2011 - 15:28:41: [SM] Native "GetEdictClassname" reported: Invalid edict (337 - 337)
    L 01/29/2011 - 15:28:41: [SM] Displaying call stack trace for plugin "l4d_gear_transfer_1.4.11.smx":
    L 01/29/2011 - 15:28:41: [SM] [0] Line 620, /home/groups/alliedmodders/forums/files/8/5/7/7/8/76220.attach::Event_SpawnerGiveItem()
    Elektramode is offline
    Elektramode
    Senior Member
    Join Date: Mar 2010
    Old 01-29-2011 , 11:48   Re: [L4D & L4D2] Flare and Light Package (1.0) [29-Jan-2011]
    Reply With Quote #10

    Wait, Imight be wrong as I was playing on the new mutation nightmare. Did it on campaign and it works great. A few questions though? What gamemodes is it compatible on and how to change colours I tried sm_flare G/B/R but no change
    Elektramode is offline
    Reply


    Thread Tools
    Display Modes

    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 Jump


    All times are GMT -4. The time now is 07:33.


    Powered by vBulletin®
    Copyright ©2000 - 2018, vBulletin Solutions, Inc.
    Theme made by Freecode