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

Help with entity that using math_counter


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Oylsister
Senior Member
Join Date: Aug 2019
Location: KhonKaen, Thailand
Old 07-13-2020 , 00:03   Help with entity that using math_counter
Reply With Quote #1

Hi everyone, I have the BossHP plugins for Zombie Escape and its interface is kind the old because it only shows the name of entity and health remain. So I decide to add HP bar text feature.
but ended up struggling to try to make the hp bar in the boss and realized later that I need to get Max Health of the boss. in order to make an HPbar text.

For Breakable entity, it's simple

PHP Code:
iHealth GetEntProp(iBreakableEntProp_Data"m_iHealth");
iMaxHealth GetEntProp(iBreakableEntProp_Data"m_iMaxHealth"); 
But when I start working on the boss that using math_counter method

PHP Code:
int iCounterVal RoundFloat(GetOutputValueFloat(iCounterEnt"m_OutValue"));

if(!
IsCounterReverse)
{
    
int iCounterMin RoundFloat(GetEntPropFloat(iCounterEntProp_Data"m_flMin"));
    
iHealth iCounterVal iCounterMin;
}
else
{
    
int iCounterMax RoundFloat(GetEntPropFloat(iCounterEntProp_Data"m_flMax"));
    
iHealth iCounterMax iCounterVal;

I just simply don't know how to create max health for this one. since m_OutValue will always get the current value. and I'm not sure that if m_GetValue will work with it.
Oylsister 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 17:26.


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