Raised This Month: $51 Target: $400
 12% 

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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
Silvers
SourceMod Plugin Approver
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 , 22: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 - 1076 views - 77.1 KB)
    File Type: zip l4d_flare.zip (53.8 KB, 2273 views)
    __________________

    Last edited by Silvers; 01-01-2012 at 16:25.
    Silvers is offline
     



    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 06:07.


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