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

[L4D2] Weapon Equip Glow [v1.0.0 | 26-December-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7900
Plugin Version:
1.0.0
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Adds glow to equip items
    Old 12-26-2021 , 12:57   [L4D2] Weapon Equip Glow [v1.0.0 | 26-December-2021]
    Reply With Quote #1

    L4D2 ONLY

    Description

    Adds glow to equipped items (visible by all teams) and restores the default glow config back on item drop.

    The main idea was to give hints about items being carried on by survivors, giving more advantage to infected team on scavenge events.

    Besides all settings only the weapons below are able to set some configs, like the glow color:
    • Gascan
    • Propane Canister
    • Oxygen Tank
    • Fireworks Crate

    For the other items, it glows but only with the default (blue) glow and aren't affected by settings like flashing or color.

    Features
    • Allow to add a glow to equipped items.
    • Allow to set the glow type, color, flashing and range for some weapons.
    • Allow configuring the glow brightness. (not accurate)

    Preview



    Cvars

    A configuration file named "l4d2_weapon_equipped_glow.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.

    PHP Code:
    // Enable/Disable the plugin.
    // 0 = Disable, 1 = Enable.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_weapon_equip_glow_enable "1"

    // Which types of gascan should be affected by the plugin.
    // 0 = NONE, 1 = NORMAL, 2 = SCAVENGE, 3 = BOTH.
    // Add numbers greater than 0 for multiple options.
    // Example: "3", enables for NORMAL and SCAVENGE gascans.
    // -
    // Default: "3"
    // Minimum: "0.000000"
    // Maximum: "3.000000"
    l4d2_weapon_equip_glow_gascan_type "3"

    // Algorithm value to detect the glow minimum brightness for a random color (not accurate).
    // -
    // Default: "0.5"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_weapon_equip_glow_min_brightness "0.5" 
    Data file (data/l4d2_weapon_equipped_glow.cfg)
    PHP Code:
    // Attributes explained:
    //  "enable"   -> Apply plugin glow to entity. "0" = Disable, "1" = Enable.
    //  "random"   -> Apply a random glow color. "0" = OFF, "1" = ON.
    //  "color"    -> Item glow color. Use three values between 0-255 separated by spaces. "<0-255> <0-255> <0-255>", e.g: "255 255 255". Ignored when "random" is "1".
    //  "flashing" -> Add a flashing effect on glowing entities. "0" = OFF, "1" = ON.
    //  "type"     -> Glow type. "0" = OFF, "1" = OnUse (doesn't works), "2" = OnLookAt (doesn't works well for some entities), "3" = Constant (better results but visible through walls).
    //  "rangemin" -> Minimum distance that the client must be from the entity to start glowing. "0" = No minimum distance.
    //  "rangemax  -> Maximum distance that the client can be away from the entity to start glowing. "0" = No maximum distance.

    "l4d2_weapon_equipped_glow"
    {
        
    "default"
        
    {
            
    "enable"        "0"
            "random"        "0"
            "color"         "255 255 255"
            "flashing"      "0"
            "type"          "3"
            "rangemin"      "0"
            "rangemax"      "0"
        
    }

        
    "classnames"
        
    {
            
    // Carryables
            
    "weapon_gascan"
            
    {
                
    "enable"        "1"
                "color"         "255 0 0"
            
    }
            
    "weapon_propanetank"
            
    {
                
    "enable"        "1"
                "color"         "255 0 0"
            
    }
            
    "weapon_oxygentank"
            
    {
                
    "enable"        "1"
                "color"         "255 0 0"
            
    }
            
    "weapon_fireworkcrate"
            
    {
                
    "enable"        "1"
                "color"         "255 0 0"
            
    }

            
    // Note:
            // All weapons below only glow in the default color and aren't affected by any other config (game-design)
            
    "weapon_gnome"
            
    {
                
    "enable"        "1"
            
    }
            
    "weapon_cola_bottles"
            
    {
                
    "enable"        "1"
            
    }

            
    // Primary Weapons - Slot 1
            // Tier 1
            // SMGs
            
    "weapon_smg"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_smg_silenced"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_smg_mp5"
            
    {
                
    "enable"        "0"
            
    }
            
    // Shotguns
            
    "weapon_pumpshotgun"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_shotgun_chrome"
            
    {
                
    "enable"        "0"
            
    }

            
    // Tier 2
            // Rifles
            
    "weapon_rifle"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_rifle_desert"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_rifle_ak47"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_rifle_sg552"
            
    {
                
    "enable"        "0"
            
    }
            
    // Shotguns
            
    "weapon_autoshotgun"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_shotgun_spas"
            
    {
                
    "enable"        "0"
            
    }
            
    // Snipers
            
    "weapon_hunting_rifle"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_sniper_military"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_sniper_scout"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_sniper_awp"
            
    {
                
    "enable"        "0"
            
    }
            
    // Tier 3
            
    "weapon_rifle_m60"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_grenade_launcher"
            
    {
                
    "enable"        "0"
            
    }

            
    // Secondary Weapons - Slot 2
            // Pistols
            
    "weapon_pistol"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_pistol_magnum"
            
    {
                
    "enable"        "0"
            
    }

            
    // Throwables - Slot 3
            
    "weapon_molotov"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_pipe_bomb"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_vomitjar"
            
    {
                
    "enable"        "0"
            
    }

            
    // Upgrade Packs - Slot 4
            
    "weapon_upgradepack_explosive"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_upgradepack_incendiary"
            
    {
                
    "enable"        "0"
            
    }

            
    // Health Items - Slot 4
            
    "weapon_first_aid_kit"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_defibrillator"
            
    {
                
    "enable"        "0"
            
    }

            
    // Health Items - Slot 5
            
    "weapon_pain_pills"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_adrenaline"
            
    {
                
    "enable"        "0"
            
    }

            
    // Melees - Slot 2
            
    "weapon_chainsaw"
            
    {
                
    "enable"        "0"
            
    }
            
    "weapon_melee"
            
    {
                
    "enable"        "0"
            
    }
        }

         
    // "weapon_melee" must be "enabled" set to "1"
        
    "melees"
        
    {
            
    "fireaxe"
            
    {
                
    "enable"        "0"
            
    }
            
    "frying_pan"
            
    {
                
    "enable"        "0"
            
    }
            
    "machete"
            
    {
                
    "enable"        "0"
            
    }
            
    "baseball_bat"
            
    {
                
    "enable"        "0"
            
    }
            
    "crowbar"
            
    {
                
    "enable"        "0"
            
    }
            
    "cricket_bat"
            
    {
                
    "enable"        "0"
            
    }
            
    "tonfa"
            
    {
                
    "enable"        "0"
            
    }
            
    "katana"
            
    {
                
    "enable"        "0"
            
    }
            
    "electric_guitar"
            
    {
                
    "enable"        "0"
            
    }
            
    "knife"
            
    {
                
    "enable"        "0"
            
    }
            
    "golfclub"
            
    {
                
    "enable"        "0"
            
    }
            
    "pitchfork"
            
    {
                
    "enable"        "0"
            
    }
            
    "shovel"
            
    {
                
    "enable"        "0"
            
    }
            
    "riotshield"
            
    {
                
    "enable"        "0"
            
    }
        }

    Admin Commands
    • sm_glowequipreload => Reload the glow equip configs. (z flag required)
    • sm_print_cvars_l4d2_weapon_equipped_glow => Print the plugin related cvars and their respective values to the console. (z flag required)

    Change Log

    Spoiler


    Notes
    • When the weapon is not able to change some configs it will behave like a default glow (blue).
    • The glow is not visible to the owner, you are only able to see the weapon glow from other clients.

    Related Plugins

    Post Reply
    • Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.

    Installation
    • Put the "l4d2_weapon_equipped_glow.cfg" file in your "\addons\sourcemod\data\" folder.
    • Put the "l4d2_weapon_equipped_glow.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
    
    Attached Files
    File Type: cfg l4d2_weapon_equip_glow.cfg (5.9 KB, 346 views)
    File Type: sp Get Plugin or Get Source (l4d2_weapon_equip_glow.sp - 381 views - 23.4 KB)
    __________________

    Last edited by Marttt; 01-15-2023 at 12:20.
    Marttt is offline
    kalmas77
    Junior Member
    Join Date: Sep 2021
    Old 01-08-2022 , 15:52   Re: [L4D2] Weapon Equip Glow [v1.0.0 | 26-December-2021]
    Reply With Quote #2

    Hi, can you make an optional cvar to use it only with gas cans and not weapons?
    kalmas77 is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 01-09-2022 , 16:26   Re: [L4D2] Weapon Equip Glow [v1.0.0 | 26-December-2021]
    Reply With Quote #3

    Just set the other "classnames" to "enable" "0" in the data file.
    __________________
    Marttt is offline
    Voevoda
    Senior Member
    Join Date: Aug 2016
    Old 05-11-2022 , 20:09   Re: [L4D2] Weapon Equip Glow [v1.0.0 | 26-December-2021]
    Reply With Quote #4

    I don't see my weapon consecration

    Quote:
    "weapon_sniper_awp"
    {
    "enable" "1"
    "color" "255 0 0"
    "type" "3"
    }
    Voevoda is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 05-11-2022 , 20:12   Re: [L4D2] Weapon Equip Glow [v1.0.0 | 26-December-2021]
    Reply With Quote #5

    Not all weapons are supported, as is by game design, it is mentioned in the main post.

    Quote:
    Originally Posted by Marttt View Post
    Besides all settings only the below weapons are able to set some configs, like the glow color:
    • Gascan
    • Propane Canister
    • Oxygen Tank
    • Fireworks Crate

    For the other items, it glows but only with the default (blue) glow and aren't affected by settings like flashing or color.
    __________________

    Last edited by Marttt; 05-11-2022 at 20:14.
    Marttt is offline
    Reply



    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 05:18.


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