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

m_iMaxHealth not affecting max health


Post New Thread Reply   
 
Thread Tools Display Modes
MikeJS
Senior Member
Join Date: Nov 2008
Old 03-22-2009 , 07:22   Re: m_iMaxHealth not affecting max health
Reply With Quote #11

As far as I know ammomod uses OnGameFrame.
__________________
MikeJS is offline
blakeoxx
Member
Join Date: Jan 2009
Old 03-22-2009 , 11:57   Re: m_iMaxHealth not affecting max health
Reply With Quote #12

Quote:
Originally Posted by ukm View Post
Failing any way to actually set the max health, blake could you elaborate a bit on how you implemented periodically adding health to offset the degradation?
This plugin isnt perfect. Like I said, its pretty expensive to the CPU compared to the preferred method. Also this could be made better by adding a "normal health" check in the timer that checks what the clients usual maximum health is, and killing the timer if the health amount is less than or equal to that amount. Feel free to tear it apart and use it how you please.

sm_sethealth <#userid|name> <amount>, where amount is the amount of health you want the client to have. If you give an amount less than 10, the healing timer on the given client will be killed. (Dont ask why I used 10. I just thought it was a nice number to use )
Attached Files
File Type: sp Get Plugin or Get Source (sethealth.sp - 533 views - 2.7 KB)

Last edited by blakeoxx; 03-22-2009 at 12:00.
blakeoxx is offline
iamf2p
Member
Join Date: Nov 2018
Old 03-29-2019 , 19:55   Re: m_iMaxHealth not affecting max health
Reply With Quote #13

cause m_iMaxHealth Always return 0
iamf2p is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 03-29-2019 , 22:04   Re: m_iMaxHealth not affecting max health
Reply With Quote #14

Quote:
Originally Posted by iamf2p View Post
cause m_iMaxHealth Always return 0
You realize that this thread is almost a decade old?

If you really want to know how to adjust the max health:
  • SDKHooks (shipped with SourceMod) now has a hook for SDKHook_GetMaxHealth that can override a player's max health
  • For TF2, you can add attribute 26: max health additive bonus using
    • TF2Attributes to set attributes on the player directly
    • TF2Items to set attributes on a weapon
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
CliptonHeist
Senior Member
Join Date: Feb 2016
Old 03-29-2019 , 23:22   Re: m_iMaxHealth not affecting max health
Reply With Quote #15

Quote:
Originally Posted by Powerlord View Post
You realize that this thread is almost a decade old?
no its over a decade old
CliptonHeist 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 08:33.


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