Raised This Month: $12 Target: $400
 3% 

[L4D2] Versus Water Brake


Post New Thread Reply   
 
Thread Tools Display Modes
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 11-22-2022 , 08:26   Re: [L4D2] Versus Water Brake 1.1.1b
Reply With Quote #91

Quote:
Originally Posted by Shadowysn View Post
The plugin doesn't consider pills-health in it's calculation.
Add:
PHP Code:
float GetTempHealth(int client)
{
    
float fGameTime GetGameTime();
    
float fHealthTime GetEntPropFloat(clientProp_Send"m_healthBufferTime");
    
float fHealth GetEntPropFloat(clientProp_Send"m_healthBuffer");
    
fHealth -= (fGameTime fHealthTime) * g_hCvar_PillsDecay.FloatValue;
    return 
fHealth 0.0 0.0 fHealth;
}

// This in plugin start:
g_hCvar_PillsDecay FindConVar("pain_pills_decay_rate");

// You could hook the convar change and read into a float variable instead of doing g_hCvar_PillsDecay.FloatValue 
and do:
PHP Code:
GetClientHealth(i) + GetTempHealth(i) < lowHealthLimitLimp 
to get the accurate temp health value.
__________________
Silvers 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 18:28.


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