Raised This Month: $ Target: $400
 0% 

[REQ-TF2] set players health


Post New Thread Reply   
 
Thread Tools Display Modes
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 05-18-2008 , 19:56   Re: [REQ-TF2] set players health
Reply With Quote #11

You can't do it to yourself when you run a listen server.
bl4nk is offline
sirmoe
Senior Member
Join Date: Mar 2008
Old 05-18-2008 , 20:15   Re: [REQ-TF2] set players health
Reply With Quote #12

Quote:
Originally Posted by bl4nk View Post
You can't do it to yourself when you run a listen server.
It's a dedicated server, but yes i did try it on myself.
sirmoe is offline
sirmoe
Senior Member
Join Date: Mar 2008
Old 05-21-2008 , 04:09   Re: [REQ-TF2] set players health
Reply With Quote #13

*bump* Can anyone confirm its still working?
sirmoe is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 06-21-2008 , 14:45   Re: [REQ-TF2] set players health
Reply With Quote #14

Try out this version. I added support for @ commands as well.
Attached Files
File Type: sp Get Plugin or Get Source (sethealth.sp - 635 views - 1.3 KB)
bl4nk is offline
FunTF2Server
Veteran Member
Join Date: Apr 2008
Old 06-21-2008 , 16:18   Re: [REQ-TF2] set players health
Reply With Quote #15

will this work on non-tf2 games like HL2M and third party mods? If not can you make one that will
__________________
FunTF2Server is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 06-21-2008 , 19:03   Re: [REQ-TF2] set players health
Reply With Quote #16

You can edit the source and remove the line where it sets the "m_iMaxHealth" offset, and it will work with other mods just fine.
bl4nk is offline
Downtown1
Veteran Member
Join Date: Mar 2004
Old 06-22-2008 , 14:43   Re: [REQ-TF2] set players health
Reply With Quote #17

Set the health to -1, it sets it to the max value then .
Downtown1 is offline
FunTF2Server
Veteran Member
Join Date: Apr 2008
Old 07-03-2008 , 03:50   Re: [REQ-TF2] set players health
Reply With Quote #18

Quote:
Originally Posted by bl4nk View Post
You can edit the source and remove the line where it sets the "m_iMaxHealth" offset, and it will work with other mods just fine.
i tried but i dont think i edited the right line or i messed it up somehow? can someone do it for me nd upload a smx
__________________
FunTF2Server is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 07-03-2008 , 12:00   Re: [REQ-TF2] set players health
Reply With Quote #19

PHP Code:
    for (new 0target_counti++)
    {
        
SetEntityHealth(clientStringToInt(amount));
        
SetEntProp(clientProp_Send"m_iMaxHealth"StringToInt(amount));
    } 
See that line that sets the m_iMaxHealth value? Just delete that and compile it.
bl4nk is offline
Tf2Ownage
Junior Member
Join Date: Mar 2009
Old 03-07-2009 , 08:17   Re: [REQ-TF2] set players health
Reply With Quote #20

This seems to be broken for me on the line
Code:
SetEntProp(client, Prop_Send, "m_iMaxHealth", StringToInt(amount));
I think Prop_Send needs to be changed to Prop_Data.
Even still, this change stop the plugin from giving errors, but it does not seem to change your max health. Does this work for anyone else?/
Tf2Ownage 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:56.


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