Raised This Month: $ Target: $400
 0% 

[L4D1] Glow Item (White) [v1.0.4 | 19-June-2022]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7782
Plugin Version:
1.0.4
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    3 
    Plugin Description:
    Add a white outline glow effect to items on the map
    Old 09-07-2021 , 19:34   [L4D1] Glow Item (White) [v1.0.4 | 19-June-2022]
    Reply With Quote #1

    L4D1 ONLY

    L4D2 version here

    Description

    This plugin applies a white outline glow to some items making them easier to identify on the map.

    Warning

    Use carefully. This plugin may spawn too many entities depending on the number of items on the map and can cause a "ED_Alloc: no free edicts" crash.

    Features
    • Allow configuring the glow by classname.
    • Allow configuring which items should glow. (data config)
    • Allow configuring which teams should see the glow. (data config)
    • Allow configuring a blink effect to the entity with glow. (data config)
    • Allow configuring the fade distance to the entity with glow. (data config)
    • Fix spawner entities glow. (cvar)
    • Remove health cabinet glow on open when enabled.

    Preview



    Cvars

    A configuration file named "l4d1_glow_item.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"
    l4d1_glow_item_enable "1"

    // Remove glow from health cabinet after being opened.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d1_glow_item_health_cabinet "1"

    // Interval in seconds to toggle (start/stop) the glow.
    // -
    // Default: "0.3"
    // Minimum: "0.100000"
    l4d1_glow_item_interval "0.3"

    // Delete *_spawn entities when its count reaches 0.
    // 0 = OFF, 1 = ON.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d1_glow_item_remove_spawner "1" 
    Data file (data/l4d1_glow_item.cfg)
    PHP Code:
    // Attributes explained:
    //  "enable"        -> Apply plugin glow to entity. "0" = Disable, "1" = Enable.
    //  "team"          -> Which teams should see the outline glow. "-1" = Everyone, "0" = Unknown, "1" = Spectator, "2" = Survivors, "3" = Infecteds.
    //  "blink"         -> Add a blink effect (not team-based) to the entity with glow. "0" = No Blink, "1" = Soft Blink, "2" = Medium Blink, "3" = Hard Blink.
    //  "blink_random"  -> Apply a random color to the blink effect. "0" = OFF, "1" = ON.
    //  "blink_color    -> Blink effect color. Use three values between 0-255 separated by spaces. "<0-255> <0-255> <0-255>", e.g: "255 255 255". Ignored when "blink_random" is "1".
    //  "blink_alpha    -> Blink effect alpha. Value between 0-255.
    //  "fademax"       -> Distance from the nearest client at which the glow stop drawing. "0" = Disable.

    "l4d1_glow_item"
    {
        
    "default"
        
    {
            
    "enable"        "1"
            "team"          "2"
            "blink"         "2"
            "blink_random"  "0"
            "blink_color"   "0 0 0"
            "blink_alpha"   "0"
            "fademax"       "510"
        
    }

        
    "classnames"
        
    {
            
    // Primary Weapons - Slot 1
            // Tier 1
            // SMGs
            
    "weapon_smg"
            
    {
                
    "enable"        "1"
            
    }
            
    // Shotguns
            
    "weapon_pumpshotgun"
            
    {
                
    "enable"        "1"
            
    }

            
    // Tier 2
            // Rifles
            
    "weapon_rifle"
            
    {
                
    "enable"        "1"
            
    }
            
    // Shotguns
            
    "weapon_autoshotgun"
            
    {
                
    "enable"        "1"
            
    }
            
    // Snipers
            
    "weapon_hunting_rifle"
            
    {
                
    "enable"        "1"
            
    }

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

            
    // Throwables - Slot 3
            
    "weapon_molotov"
            
    {
                
    "enable"        "1"
            
    }
            
    "weapon_pipe_bomb"
            
    {
                
    "enable"        "1"
            
    }

            
    // Health Items - Slot 4
            
    "weapon_first_aid_kit"
            
    {
                
    "enable"        "1"
            
    }

            
    // Health Items - Slot 5
            
    "weapon_pain_pills"
            
    {
                
    "enable"        "1"
            
    }

            
    // Carryables
            
    "weapon_gascan"
            
    {
                
    "enable"        "1"
            
    }
            
    "weapon_propanetank"
            
    {
                
    "enable"        "1"
            
    }
            
    "weapon_oxygentank"
            
    {
                
    "enable"        "1"
            
    }

            
    // Others
            
    "weapon_ammo"
            
    {
                
    "enable"        "1"
            
    }
            
    "prop_health_cabinet"
            
    {
                
    "enable"        "1"
            
    }
            
    "prop_fuel_barrel"
            
    {
                
    "enable"        "1"
            
    }
            
    "prop_car_alarm"
            
    {
                
    "enable"        "0"
            
    }
            
    "prop_physics"
            
    {
                
    "enable"        "0"
            
    }

            
    // Miniguns
            
    "prop_minigun"
            
    {
                
    "enable"        "1"
            
    }
            
    "prop_mounted_machine_gun"
            
    {
                
    "enable"        "1"
            
    }
        }

    Admin Commands
    • sm_glowinfo => Outputs to the chat the glow info about the entity at your crosshair. (z flag required)
    • sm_glowreload => Reload the glow configs. (z flag required)
    • sm_glowremove => Remove plugin glow from entity at crosshair. (z flag required)
    • sm_glowremoveall => Remove all glows created by the plugin. (z flag required)
    • sm_glowadd => Add glow to entity at crosshair. (z flag required)
    • sm_glowall => Add glow to everything possible. (z flag required)
    • sm_print_cvars_l4d1_glow_item => Print the plugin related cvars and their respective values to the console. (z flag required)

    Change Log

    Spoiler


    Known issues
    • Depending on the item angle, the glow may disappear when you reach nearby.

    This is weird game behaviour. I have found that by changing all the weapon angles to "0 0 0", with Stripper, and noticed that all glows were kept even when I was nearby. This explains why "weapon_ammo_spawn" is always glowing in most maps.

    Code:
    modify:
    {
        match:
        {
            "classname" "/weapon.*/"
        }
        replace:
        {
            "angles" "0.00 0.00 0.00"
        }
    }
    Notes
    • This plugin uses the prop_glowing_object entity (L4D1 only) to create glows, which are visible through walls by design.
    • Isn't possible to change the glow color. L4D1 has a default white color for glow while using this entity.
    • Hand-equipped items have the glow deactivated, restoring it when dropped.
    • I notice that some models weren't applying the glow on spawn (the entity was auto-destroyed in the next frame), so the default model on spawn is the "pills" model and after spawn they are changed to their parent model.
    • Found a bug that allowed to pickup equipped weapons, that's why there is an OnUse hook to block +USE on equipped weapons.
    • I won't support clone animation handling on this plugin, I did some trials but the result wasn't good enough.

    To Do
    • Add map based configs. (including hammerid config)

    Thank you!

    Related Plugins

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

    Installation
    • Put the "l4d1_glow_item.cfg" file in your "\addons\sourcemod\data\" folder.
    • Put the "l4d1_glow_item.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
    Attached Files
    File Type: cfg l4d1_glow_item.cfg (3.1 KB, 219 views)
    File Type: sp Get Plugin or Get Source (l4d1_glow_item.sp - 389 views - 39.0 KB)
    __________________

    Last edited by Marttt; 01-15-2023 at 12:20.
    Marttt 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:56.


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