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

[L4D2] speedup healing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tenshisan
Junior Member
Join Date: Jul 2011
Location: Germany
Old 07-21-2011 , 02:42   [L4D2] speedup healing
Reply With Quote #1

I think its better to open up a new thread for this question.

is there a way to speedup healing with a firstaid kit for a specific player like admins ?
Tenshisan is offline
Tenshisan
Junior Member
Join Date: Jul 2011
Location: Germany
Old 07-23-2011 , 03:59   Re: [L4D2] speedup healing
Reply With Quote #2

Got it. is it possible to enable a Cheat for 1 person only or do i activate it everytime for complete server ?
Tenshisan is offline
Ace1564
Member
Join Date: Dec 2008
Old 08-10-2011 , 07:49   Re: [L4D2] speedup healing
Reply With Quote #3

would like to know where to get this speed healing or the name of it, i used search and cant find it.
Ace1564 is offline
BrianGriffin
Senior Member
Join Date: Oct 2008
Old 08-10-2011 , 16:01   Re: [L4D2] speedup healing
Reply With Quote #4

I tried it before. There's a cvar called "first_aid_kit_use_duration" wich says how long it takes to heal with a first aid kit (default is 5 seconds).

I tried hooking heal_begin in Pre mode and adjusting the value to my liking depending on the player. Perkmod for L4D does the same with the revive duration for the perk that lets you revive players faster. For healing (using the exact same code but with the changed event and cvar) I could not get this to work. The cvar change never affected the game when it should have, but on the guy doing the next revive.

So the guy with special reviving powers tried to revive -> 5 secs
Next guy WITHOUT special reviving powers tries -> 1 sec
And the next guy trying will get 5 secs again because the guy without special reviving powers reset the cvar.
BrianGriffin is offline
ajr1234
Senior Member
Join Date: Mar 2011
Location: Chicago, IL, U.S.A.
Old 08-10-2011 , 16:29   Re: [L4D2] speedup healing
Reply With Quote #5

Try creating your own progress bars and using your own timer system. So use CreateProgressBar() to set up a progress bar with X seconds. If they ever stop healing in the middle, kill the bar. If they ever stop healing (as in GetEntPropEnt(client, Prop_Send, "m_useActionTarget") is not > 0), kill the bar. In X seconds, if the bar is not killed, heal the client. It's actually sort of complex.

PHP Code:
stock CreateProgressBar(clientFloat:fTimeDur)
{
    
SetEntPropFloat(clientProp_Send"m_flProgressBarDuration"fTimeDur);
    
SetEntPropFloat(clientProp_Send"m_flProgressBarStartTime"GetGameTime());
}

stock KillProgressBar(client)
{
    
SetEntPropFloat(clientProp_Send"m_flProgressBarDuration"0.0);
    
SetEntPropFloat(clientProp_Send"m_flProgressBarStartTime"GetGameTime());

ajr1234 is offline
AtomicStryker
Veteran Member
Join Date: Apr 2009
Location: Teutonia!!
Old 08-12-2011 , 07:16   Re: [L4D2] speedup healing
Reply With Quote #6

Quote:
Originally Posted by BrianGriffin View Post
I tried it before. There's a cvar called "first_aid_kit_use_duration" wich says how long it takes to heal with a first aid kit (default is 5 seconds).

I tried hooking heal_begin in Pre mode and adjusting the value to my liking depending on the player. Perkmod for L4D does the same with the revive duration for the perk that lets you revive players faster. For healing (using the exact same code but with the changed event and cvar) I could not get this to work. The cvar change never affected the game when it should have, but on the guy doing the next revive.

So the guy with special reviving powers tried to revive -> 5 secs
Next guy WITHOUT special reviving powers tries -> 1 sec
And the next guy trying will get 5 secs again because the guy without special reviving powers reset the cvar.

The problem with the event is that it's "too late". Try SDKHooks to intercept the action at an earlier time.
AtomicStryker is offline
Predailien12
Senior Member
Join Date: Feb 2010
Location: Your as* hol*
Old 08-12-2011 , 15:14   Re: [L4D2] speedup healing
Reply With Quote #7

Well, I think you need to be more detailed for him
Predailien12 is offline
Antithasys
Moderator
Join Date: Apr 2008
Old 08-12-2011 , 16:53   Re: [L4D2] speedup healing
Reply With Quote #8

Quote:
Originally Posted by AtomicStryker View Post
The problem with the event is that it's "too late". Try SDKHooks to intercept the action at an earlier time.
^ = Problem and solution.
__________________
[my plugins]

When you think about asking a question... consider what have you tried?
Antithasys is offline
Reply


Thread Tools
Display Modes

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 16:31.


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