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

L4D2 health notifier!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
theblade
Junior Member
Join Date: Feb 2011
Old 09-16-2011 , 02:29   L4D2 health notifier!
Reply With Quote #1

Hello everyone,
I am looking for a plugin I saw on 1 l4d2 server. The plugin is for showing approximately how much health each player has. What it does is it makes the player glow different color depending on the amount of health he/she has. For example if the player has full health he/she glows green if the health is critical he/she glows red etc.... I saw this plugin on a server and find it very usefull when you have 10+ players on the server. I searched for it on here with no luck. If anyone can link me to it or help code a similar plugin I would appreciate it.

Thanks in advance!
theblade is offline
jake84
Senior Member
Join Date: Jun 2010
Location: CA
Old 09-16-2011 , 06:33   Re: L4D2 health notifier!
Reply With Quote #2

hi. the creator of this plugin is Mr. Zero
http://forums.alliedmods.net/member.php?u=55152

he has gone all private with his mods and don't want to share them, but maybe if you ask kindly he will share it to the public.
jake84 is offline
Mr. Zero
Veteran Member
Join Date: Jun 2009
Location: Denmark
Old 09-16-2011 , 13:33   Re: L4D2 health notifier!
Reply With Quote #3

I don't share my plugins since they don't fulfill half the stuff that is necessary in order to share them here.
Not to mention all of the install instructions I have to type with some of them.

But I am always willing to tell you how I did certain stuff.

As for health glows, as I call them, I simply retrieve the client health and set their health accordingly with my glow stock functions.
Loosely typed:
PHP Code:
for (new client 1client <= MaxClientsclient++)
{
    new 
health GetClientHealth(client);
    
L4D2_SetEntGlow(clientL4D2Glow_OnLookAt1920GetHealthGlowColor(health), false);

That is pretty much all there is too it.

My stocks can be found here: https://code.google.com/p/l4dstocks/...l4d_stocks.inc
Glow color stocks: https://code.google.com/p/l4dstocks/...stocks.inc#573
Mr. Zero is offline
jake84
Senior Member
Join Date: Jun 2010
Location: CA
Old 09-16-2011 , 13:45   Re: L4D2 health notifier!
Reply With Quote #4

well, clients health are changing all the time so when are you checking for everyone's health and setting colors? On repeating timer? On ongameframe? On OnPlayerHurt?
we need more info
jake84 is offline
Mr. Zero
Veteran Member
Join Date: Jun 2009
Location: Denmark
Old 09-16-2011 , 16:40   Re: L4D2 health notifier!
Reply With Quote #5

Quote:
Originally Posted by jake84 View Post
well, clients health are changing all the time so when are you checking for everyone's health and setting colors? On repeating timer? On ongameframe? On OnPlayerHurt?
we need more info
Player hurt of course.

If you are using buy plugins or something that gives clients health, you might want to consider a timer instead, to ensure that the glow color is correct.
Mr. Zero is offline
jake84
Senior Member
Join Date: Jun 2010
Location: CA
Old 09-16-2011 , 18:27   Re: L4D2 health notifier!
Reply With Quote #6

Quote:
Originally Posted by Mr. Zero View Post
Player hurt of course.

If you are using buy plugins or something that gives clients health, you might want to consider a timer instead, to ensure that the glow color is correct.
Are you setting their glow to green on round_start? are you setting glow after they've been revived, rescued, or used their pills? since this is not onhurt relayted. or are you just doing it on player_hurt?

what hp range defines the right glow?
40-100 = green glow?
39-25 = yellow glow?
24-1 hp = red glow?

GetHealthGlowColor is in your code, but i can't find it defined in your stocks. this makes it uncompleted code.

Last edited by jake84; 09-16-2011 at 18:41.
jake84 is offline
Mr. Zero
Veteran Member
Join Date: Jun 2009
Location: Denmark
Old 09-16-2011 , 19:54   Re: L4D2 health notifier!
Reply With Quote #7

Quote:
Originally Posted by jake84 View Post
Are you setting their glow to green on round_start? are you setting glow after they've been revived, rescued, or used their pills? since this is not onhurt relayted. or are you just doing it on player_hurt?
On a ton of events. Hurt, revive, round start, incap. All of those that change health state.

Quote:
Originally Posted by jake84 View Post
what hp range defines the right glow?
40-100 = green glow?
39-25 = yellow glow?
24-1 hp = red glow?
That is what Valve uses.

Quote:
Originally Posted by jake84 View Post
GetHealthGlowColor is in your code, but i can't find it defined in your stocks. this makes it uncompleted code.
GetHealthGlowColor was just an example. SetEntGlow function takes RGB color.

Which means if you want a green color you want 0, 255, 0. Red is 255, 0, 0 and yellow would be 0 255 255. The closer to 0 0 0, the less bright the glow is. No alpha.
Mr. Zero is offline
theblade
Junior Member
Join Date: Feb 2011
Old 09-17-2011 , 03:09   Re: L4D2 health notifier!
Reply With Quote #8

@jake84: if you get something similar to Mr. Zero's plugin I would appreciate it if you post it for all of us. I would try myself but just started java this semester and have no clue of how to put this plugin together.
@Mr. Zero: Could you release the source code or the plugin itself. No need to explain how to install etc... we will figure it out. We would really appreciate it.
theblade is offline
jake84
Senior Member
Join Date: Jun 2010
Location: CA
Old 09-17-2011 , 04:10   Re: L4D2 health notifier!
Reply With Quote #9

too many bugs. mr zero wins.

Last edited by jake84; 09-17-2011 at 18:03.
jake84 is offline
theblade
Junior Member
Join Date: Feb 2011
Old 09-17-2011 , 11:27   Re: L4D2 health notifier!
Reply With Quote #10

We appreciate your effort. Hope you get something working soon.
I dont understand how Mr.Zero was able to write all these comments and tips nd not able to upload a file or 2? O well will. His plugin , his decision.
theblade 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 23:18.


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