Raised This Month: $ Target: $400
 0% 

[REQ] [TF2] Set all players health to 1


Post New Thread Reply   
 
Thread Tools Display Modes
Alurict
Junior Member
Join Date: Feb 2013
Old 02-21-2013 , 00:11   Re: [REQ] [TF2] Set all players health to 1
Reply With Quote #11

Is it possible to hook the event that TF2 uses when it resets the health, and then put return Plugin_Handled?

I think that would fix our problem.

bl4nk: I've considered this, and I figured out how to do it just now, but in order to be sure I'm setting everyones health to 1 all the time, I would have to create a tf2items.weapons.txt file that includes one of every possible item for each class. That would take a while, I think, but I'm going to start doing it in case I can't find another way (having the item list built anyway will be nice for other stuff).

Thanks for the suggestions!
Alurict is offline
Alurict
Junior Member
Join Date: Feb 2013
Old 02-21-2013 , 01:09   Re: [REQ] [TF2] Set all players health to 1
Reply With Quote #12

Actually, I figured out a good way to do it with TF2Items.

The following tf2items.weapons.txt worked well for me. ^^
PHP Code:
"custom_weapons_v3"
{
    
"*"
    
{
        
"*"
        
{
            
"1"        "125 ; -999"
        
}
    }

For anybody who doesn't know, this sets the attribute "125", which is "max health additive penalty" (as found here: http://wiki.teamfortress.com/wiki/Li...tem_attributes), to "-999", on every single class and for every single user.

The "*" means everyone, and every item. Since the game won't let your max health go below 1, this sets your max health to 1 and it stays that way. It's a nice way to go about it too, because all the regular health calculations work just as they normally would.

Thanks bl4nk!

Last edited by Alurict; 02-21-2013 at 01:10. Reason: Added link
Alurict 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:24.


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