AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [L4D2] Infected Hud Health Bar (https://forums.alliedmods.net/showthread.php?t=321565)

xZk 02-17-2020 00:12

[L4D2] Infected Hud Health Bar
 
5 Attachment(s)
Intro
This plugin is inspired by Infected Health Gauge plugin, this will allow to give relative knowledge of the health of the infected through a health bar
Details
The health bar is shown on the hud "env_instructor_hint", through a text within it, you can change the size of the bar width, as well as the text that represents the points of damage and health.

Cvars:
PHP Code:

// 0:Disable , 1:Enable Plugin
// -
// Default: "1"
l4d2_infected_hudhpbar_activated "1"

// 0:Disable, 1:Enable Show Hud HP Bar for Boomer
// -
// Default: "0"
l4d2_infected_hudhpbar_on_boomer "0"

// 0:Disable, 1:Enable Show Hud HP Bar for Charger
// -
// Default: "0"
l4d2_infected_hudhpbar_on_charger "0"

// 0:Disable, 1:Enable Show Hud HP Bar for Hunter
// -
// Default: "0"
l4d2_infected_hudhpbar_on_hunter "0"

// 0:Disable, 1:Enable Show Hud HP Bar for Jockey
// -
// Default: "0"
l4d2_infected_hudhpbar_on_jockey "0"

// 0:Disable, 1:Enable Show Hud HP Bar for Smoker
// -
// Default: "0"
l4d2_infected_hudhpbar_on_smoker "0"

// 0:Disable, 1:Enable Show Hud HP Bar for Spitter
// -
// Default: "0"
l4d2_infected_hudhpbar_on_spitter "0"

// 0:Disable, 1:Enable Show Hud HP Bar for Witch
// -
// Default: "1"
l4d2_infected_hudhpbar_on_witch "1"

// 0:Disable, 1:Enable Show Hud HP Bar for Tank
// -
// Default: "1"
l4d2_infected_hudhpbar_on_tank "1"

// Set range Instuctor Hint For Tank (0 = infinite range)
// -
// Default: "750.0"
// Minimum: "0.000000"
// Maximum: "750.000000"
l4d2_infected_hudhpbar_range "750.0"

// Set time out in seconds HP Bar (0 = no time out)
// -
// Default: "3.0"
// Minimum: "0.000000"
l4d2_infected_hudhpbar_showtime "3.0"

// Set width size for health bar
// -
// Default: "10"
// Minimum: "2.000000"
// Maximum: "100.000000"
l4d2_infected_hudhpbar_size "10"

// Set text for damage point
// -
// Default: "··"
l4d2_infected_hudhpbar_textdmg " "

// Set text for health point
// -
// Default: "-"
l4d2_infected_hudhpbar_texthp "-"

// Set text for dead hint ("" = no dead hint)
// -
// Default: ""
l4d2_infected_hudhpbar_textdead ""

// Set RGB color for full HP
// -
// Default: "0,255,0"
l4d2_infected_hudhpbar_colorfull "0,255,0"

// Set RGB color for half HP
// -
// Default: "255,255,0"
l4d2_infected_hudhpbar_colorhalf "255,255,0"

// Set RGB color for critic HP
// -
// Default: "255,0,0"
l4d2_infected_hudhpbar_colorcritic "255,0,0" 

Credits:
MasterMind420: for his code [L4D2]Infected Hud plugin
BHaType: for his code Hint plugin
Silvers: for his useful tips [TUT]SourcePawn Scripting - Tips, Basics to Advanced


Changelog:
Code:

2020-10-14 (v1.2)
* Added new cvar for enabling HP Bar on Witch
* Added CFG file for customize HP Bar for each Special Infected

2020-02-22 (v1.1)
* Fixed set custom characters in cvars text points
* Added new cvar for hint on infected dead
* Added new cvars for custom colors on HP Bar

2020-02-17 (v1.0)
* Initial release.

Rant:
-put Attachment 184393 in "/addons/sourcemod/data/" folder if this file is not autogenerated.

strikeraot 02-17-2020 01:47

Re: [L4D2] Infected Hud Health Bar
 
Quote:

Plugin failed to compile! Please try contacting the author.

BloodyBlade 02-17-2020 12:06

Re: [L4D2] Infected Hud Health Bar
 
The plugin uses sdktools and sdkhooks.
You need to compile the plugin locally.

BloodyBlade 02-17-2020 12:09

Re: [L4D2] Infected Hud Health Bar
 
@xZk, please download the compiled version in your post.

xZk 02-17-2020 15:14

Re: [L4D2] Infected Hud Health Bar
 
fixed, had been changed to the v1.0 compiler...changed to 1.9

Marttt 02-17-2020 18:25

Re: [L4D2] Infected Hud Health Bar
 
nice plugin xZk,

I did a similar one, but didn't share here yet, because I want to make it playable for versus making it visibility team-based, Mastermind had given me some tips but I didn't have time to implement by now.

As a suggestion, for future releases, add the hud also to the witch.

xZk 02-18-2020 12:55

Re: [L4D2] Infected Hud Health Bar
 
Thanks, I did not want to share it before because it was in conflict with the Infected Hud Mastermind plugin, but the 2 work well :D, about the witch possibly in the next update I will add it, in addition to other things to better customize the hp bar for each class of infected

MasterMind420 02-18-2020 17:05

Re: [L4D2] Infected Hud Health Bar
 
Quote:

Originally Posted by xZk (Post 2684299)
Thanks, I did not want to share it before because it was in conflict with the Infected Hud Mastermind plugin, but the 2 work well :D, about the witch possibly in the next update I will add it, in addition to other things to better customize the hp bar for each class of infected

Honestly if you wanted to add numbers as well as an option I would take no offense, merge the 2 if you want. I don't code as much as I used to so it's all good.

xZk 02-22-2020 15:19

Re: [L4D2] Infected Hud Health Bar
 
Quote:

Originally Posted by MasterMind420 (Post 2684327)
Honestly if you wanted to add numbers as well as an option I would take no offense, merge the 2 if you want. I don't code as much as I used to so it's all good.

I think I explained myself badly, what I meant was that this plugin did not know how to make it compatible with yours before, without conflicts, since if one worked the other did not, but now both plugins could work together independently of each other :)

Voevoda 04-16-2020 16:34

Re: [L4D2] Infected Hud Health Bar
 
does not work


All times are GMT -4. The time now is 14:45.

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