Raised This Month: $32 Target: $400
 8% 

[L4D/L4D2]Tank HP Color


Post New Thread Reply   
 
Thread Tools Display Modes
Author
xZk
Senior Member
Join Date: Nov 2017
Location: cl
Plugin ID:
6538
Plugin Version:
1.0.5
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    change color Tank depending on your health percentage
    Old 04-24-2019 , 15:05   [L4D/L4D2]Tank HP Color
    Reply With Quote #1

    Intro

    The idea of this plugin arises from the need to know the hp of the tank, without having to resort to other plugins that use HUDs or entities. So to help a friend on his server, i decided to create this plugin.

    The color of the tank changes as he suffers some type of damage. The color varies gradually depending on your percentage of health, among the default colors:
    (full color)White-Yellow-Red. You can also choose the 3 colors for your state of hp percent

    Cvars:

    PHP Code:
    // 0: Disable, 1: Enable plugin
    // Default: "1"
    tank_hpcolor_on "1"

    // 0: Disable restore color, 1: Activated for each delay interval, 2: Reset the delay for each damage"
    // Default: "0"
    tank_hpcolor_reset "0"

    // Set time in seconds to restore color
    // Default: "0.5"
    // Minimum: "0.100000"
    tank_hpcolor_reset_delay "0.5"

    // Set color full hp"
    // Default: "255,255,255"
    tank_hpcolor_full "255,255,255"

    // Set color half hp"
    // Default: "255,255,0"
    tank_hpcolor_half "255,255,0"

    // Set color critic hp"
    // Default: "255,0,0"
    tank_hpcolor_critic "255,0,0" 
    Code:
    2019-04-24(v1.0.0)
    * Initial release. 
    
    2019-05-3 (v1.0.5)
    * Fixed check prop max health.
    
    2019-05-27 (v1.1.0)
    * Added new metod reset color in cvar: tank_hpcolor_reset
    
    2019-05-27 (v1.2.0)
    * Added new cvars to choose the 3 colors of the state of %hp.
     tank_hpcolor_full, tank_hpcolor_half, tank_hpcolor_critic
    Notes:
    -if you use other plugins that change the color of the tank, possibly there is some conflict between them,
    therefore it is recommended to activate the cvar: tank_hpcolor_reset "1"



    credits
    Skyy
    Franc1sco


    pd: sorry for me bad english :/
    Attached Files
    File Type: sp Get Plugin or Get Source (tank_hpcolor.sp - 1830 views - 8.2 KB)

    Last edited by xZk; 05-27-2019 at 17:41. Reason: v1.2.0
    xZk is offline
    Under Dog
    Junior Member
    Join Date: May 2017
    Old 05-22-2019 , 20:32   Re: [L4D/L4D2]Tank HP Color
    Reply With Quote #2

    Simple, and it works. the only issue, when the tank dies, the body never fades away. it's just a red blob on the ground. but it does work like a charm.

    It would be cool to pick the 3 colors you wanted to use. just for fun. but it's good as is.
    Under Dog is offline
    xZk
    Senior Member
    Join Date: Nov 2017
    Location: cl
    Old 05-27-2019 , 17:49   Re: [L4D/L4D2]Tank HP Color
    Reply With Quote #3

    update 1.2 ty for suggestion Under Dog.
    but what do you mean by this?
    Quote:
    Originally Posted by Under Dog View Post
    the only issue, when the tank dies, the body never fades away. it's just a red blob on the ground.
    I believe that the body of the tank should vanish? or that the tank recovers its original color?
    xZk 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 17:23.


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