Raised This Month: $ Target: $400
 0% 

[l4d2]About survivors' temporary health


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mrs cheng
Member
Join Date: Mar 2017
Old 04-26-2019 , 14:12   [l4d2]About survivors' temporary health
Reply With Quote #1

How to make survivors' temporary health more than 200?

SetEntPropFloat(client, Prop_Send, "m_healthBuffer", 600);
SetEntPropFloat(client, Prop_Send, "m_healthBufferTime", GetGameTime());

When I set the survivor health to 600, it only shows 200.

Why is that?

Last edited by Mrs cheng; 04-26-2019 at 14:17.
Mrs cheng is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 04-26-2019 , 17:42   Re: [l4d2]About survivors' temporary health
Reply With Quote #2

Quote:
Originally Posted by Mrs cheng View Post
How to make survivors' temporary health more than 200?

SetEntPropFloat(client, Prop_Send, "m_healthBuffer", 600);
SetEntPropFloat(client, Prop_Send, "m_healthBufferTime", GetGameTime());

When I set the survivor health to 600, it only shows 200.

Why is that?
if you mean when they are incap theres a cvar that sets incap health...cant remember what its called but it shouldnt be hard to find
MasterMind420 is offline
Mrs cheng
Member
Join Date: Mar 2017
Old 04-27-2019 , 05:07   Re: [l4d2]About survivors' temporary health
Reply With Quote #3

Quote:
Originally Posted by MasterMind420 View Post
if you mean when they are incap theres a cvar that sets incap health...cant remember what its called but it shouldnt be hard to find
This cvar(surviovor_incap_health) does not exist.
Mrs cheng is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 04-28-2019 , 12:19   Re: [l4d2]About survivors' temporary health
Reply With Quote #4

Quote:
Originally Posted by Mrs cheng View Post
This cvar(surviovor_incap_health) does not exist.
in l4d2 it most certainly does and works...show what your trying to do. default incap health is 300.

Last edited by MasterMind420; 04-28-2019 at 12:20.
MasterMind420 is offline
Mrs cheng
Member
Join Date: Mar 2017
Old 04-28-2019 , 15:04   Re: [l4d2]About survivors' temporary health
Reply With Quote #5

Quote:
Originally Posted by MasterMind420 View Post
in l4d2 it most certainly does and works...show what your trying to do. default incap health is 300.
Oh, I mean the survivor is in a normal walking state, he has temporary health.
Mrs cheng is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 04-28-2019 , 15:11   Re: [l4d2]About survivors' temporary health
Reply With Quote #6

Quote:
Originally Posted by Mrs cheng View Post
Oh, I mean the survivor is in a normal walking state, he has temporary health.
This function returns players temp health...
Code:
int GetPlayerTempHealth(int client)
{
	Handle painPillsDecayCvar = INVALID_HANDLE;

	if (painPillsDecayCvar == INVALID_HANDLE)
	{
		painPillsDecayCvar = FindConVar("pain_pills_decay_rate");

		if (painPillsDecayCvar == INVALID_HANDLE)
			SetFailState("pain_pills_decay_rate not found.");
	}

	int tempHealth = RoundToCeil(GetEntPropFloat(client, Prop_Send, "m_healthBuffer") - ((GetGameTime() - GetEntPropFloat(client, Prop_Send, "m_healthBufferTime")) * GetConVarFloat(painPillsDecayCvar))) - 1;

	return tempHealth < 0 ? 0 : tempHealth;
}
Use this to get there health...

int iHealth = GetEntProp(client, Prop_Send, "m_iHealth") + GetPlayerTempHealth(client);

Last edited by MasterMind420; 04-28-2019 at 15:14.
MasterMind420 is offline
Mrs cheng
Member
Join Date: Mar 2017
Old 04-28-2019 , 15:41   Re: [l4d2]About survivors' temporary health
Reply With Quote #7

Quote:
Originally Posted by MasterMind420 View Post
This function returns players temp health...
Code:
int GetPlayerTempHealth(int client)
{
	Handle painPillsDecayCvar = INVALID_HANDLE;

	if (painPillsDecayCvar == INVALID_HANDLE)
	{
		painPillsDecayCvar = FindConVar("pain_pills_decay_rate");

		if (painPillsDecayCvar == INVALID_HANDLE)
			SetFailState("pain_pills_decay_rate not found.");
	}

	int tempHealth = RoundToCeil(GetEntPropFloat(client, Prop_Send, "m_healthBuffer") - ((GetGameTime() - GetEntPropFloat(client, Prop_Send, "m_healthBufferTime")) * GetConVarFloat(painPillsDecayCvar))) - 1;

	return tempHealth < 0 ? 0 : tempHealth;
}
Use this to get there health...

int iHealth = GetEntProp(client, Prop_Send, "m_iHealth") + GetPlayerTempHealth(client);

So how do we set survivors' temporary health to over 200?
Mrs cheng is offline
MasterMind420
BANNED
Join Date: Nov 2010
Old 04-28-2019 , 16:39   Re: [l4d2]About survivors' temporary health
Reply With Quote #8

i'll test out a few things in a little bit and get back to u...i've never actually tried it myself. When are u trying to set it?

Last edited by MasterMind420; 04-28-2019 at 16:40.
MasterMind420 is offline
Mrs cheng
Member
Join Date: Mar 2017
Old 04-29-2019 , 01:52   Re: [l4d2]About survivors' temporary health
Reply With Quote #9

Quote:
Originally Posted by MasterMind420 View Post
i'll test out a few things in a little bit and get back to u...i've never actually tried it myself. When are u trying to set it?
This situation is unexpectedly discovered by me.
When I manually set the player's temporary health to more than 200, the player's temporary health is never higher than 200.
Players will not take pills and adrenaline above 100
I want to know how to break this restriction.
Do you have any good ideas?
Mrs cheng is offline
BlackSabbarh
Senior Member
Join Date: Sep 2018
Old 05-04-2019 , 01:39   Re: [l4d2]About survivors' temporary health
Reply With Quote #10

+8500 health for the survivor

https://www.youtube.com/watch?v=7aVQH8YEbho&t=522s
BlackSabbarh 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 04:20.


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