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

Help offset m_iMaxHealth


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 01-17-2017 , 10:22   Help offset m_iMaxHealth
Reply With Quote #1

Hi all, why I can't get above 100 HP to heal yourself, although the sensor health to increase.
PHP Code:
SetEntProp(clientProp_Send"m_iMaxHealth"200); 
Alexmy is offline
Kolapsicle
Senior Member
Join Date: Oct 2014
Old 01-17-2017 , 11:14   Re: Help offset m_iMaxHealth
Reply With Quote #2

Try "Prop_Data" as the property type.
Kolapsicle is offline
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 01-18-2017 , 01:34   Re: Help offset m_iMaxHealth
Reply With Quote #3

Quote:
Originally Posted by Kolapsicle View Post
Try "Prop_Data" as the property type.
No not running, the sensor's health is increased and treated may not more than 100 hp.

PHP Code:
SetEntProp(clientProp_Send"m_iMaxHealth"200);
SetEntData(clientFindDataMapOffs(client"m_iMaxHealth"), 2004true);
SetEntProp(clientProp_Data"m_iMaxHealth"200); 
Alexmy is offline
Kolapsicle
Senior Member
Join Date: Oct 2014
Old 01-18-2017 , 07:21   Re: Help offset m_iMaxHealth
Reply With Quote #4

With m_iMaxHealth set to 200, I was able to fully heal myself inside a negative trigger_hurt.

Try checking m_iMaxHealth's value to make sure you have set it correctly. Also remember that m_iMaxHealth likes to default under certain circumstances (e.g. spawning).

PHP Code:
PrintToChat(client"%i"GetEntProp(clientProp_Data"m_iMaxHealth")); 

Last edited by Kolapsicle; 01-18-2017 at 07:30.
Kolapsicle is offline
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 01-18-2017 , 07:30   Re: Help offset m_iMaxHealth
Reply With Quote #5

Quote:
Originally Posted by Kolapsicle View Post
With m_iMaxHealth set to 200, I was able to heal myself fully inside a negative trigger_hurt.

Try checking m_iMaxHealth's value to make sure you have set it correctly. Also remember that m_iMaxHealth likes to default under certain circumstances (e.g. spawning).

PHP Code:
PrintToChat(client"%i"GetEntProp(clientProp_Data"m_iMaxHealth")); 
Thank you, but I found the reason
PHP Code:
SetEntProp(clientProp_Send"m_iMaxHealth"GetConVarInt(MaxHealth));{
        
SetConVarInt(FindConVar("first_aid_kit_max_heal"), 200falsefalse); 
        
SetConVarInt(FindConVar("pain_pills_health_threshold"), 200falsefalse); 
    } 
work
Alexmy is offline
Papero
Veteran Member
Join Date: Aug 2016
Location: Italy
Old 01-19-2017 , 12:24   Re: Help offset m_iMaxHealth
Reply With Quote #6

Why you dont just use this: SetEntityHealth (https://sm.alliedmods.net/new-api/en...etEntityHealth) ?
__________________
My Plugins
SPCode


Steam: hexer504
Telegram: Hexah
Discord: Hexah#6903

If you like my work you can donate here!
Papero is offline
Kolapsicle
Senior Member
Join Date: Oct 2014
Old 01-19-2017 , 12:35   Re: Help offset m_iMaxHealth
Reply With Quote #7

Quote:
Originally Posted by Papero View Post
Why you dont just use this: SetEntityHealth (https://sm.alliedmods.net/new-api/en...etEntityHealth) ?
I don't think he wants to simulate the results when there are cleaner options.
Kolapsicle 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 11:59.


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