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

[L4D2] How apply adrenaline effect ??


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mozilla_Firefox
Junior Member
Join Date: Jan 2018
Old 10-17-2020 , 09:54   [L4D2] How apply adrenaline effect ??
Reply With Quote #1

Hello! Sorry for the bad english. I do not know who to contact, but maybe someone can tell me.
How can I apply the adrenaline effect on a Survivor?
These codes have no effect other than redness around the edges of screen:

SetEntProp(client, Prop_Send, "m_bAdrenalineActive", 1);
SetEntProp(client, Prop_Send, "m_bAdrenalineActive", 1, 15.0);

Please tell me, I'm new

Last edited by Mozilla_Firefox; 10-18-2020 at 00:22.
Mozilla_Firefox is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 10-18-2020 , 07:29   Re: [L4D2] How apply adrenaline effect ??
Reply With Quote #2

Here is a stock i made, this is raw so no events will trigger for it when set.

PHP Code:
stock void Terror_SetAdrenalineTime(int clientfloat duration)
{
    
// Get CountdownTimer address
    
static int timerAddress = -1;
    if(
timerAddress == -1)
    {
        
timerAddress FindSendPropInfo("CTerrorPlayer""m_bAdrenalineActive") - 12;
    }
    
    
//timerAddress + 4 = Duration
    //timerAddress + 8 = TimeStamp
    
SetEntDataFloat(clienttimerAddress 4duration);
    
SetEntDataFloat(clienttimerAddress 8GetGameTime() + duration);
    
SetEntProp(clientProp_Send"m_bAdrenalineActive"11);

__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D

Last edited by Lux; 10-18-2020 at 07:33.
Lux is offline
Mozilla_Firefox
Junior Member
Join Date: Jan 2018
Old 10-18-2020 , 07:57   Re: [L4D2] How apply adrenaline effect ??
Reply With Quote #3

Quote:
Originally Posted by Lux View Post
Here is a stock i made, this is raw so no events will trigger for it when set.

PHP Code:
stock void Terror_SetAdrenalineTime(int clientfloat duration)
{
    
// Get CountdownTimer address
    
static int timerAddress = -1;
    if(
timerAddress == -1)
    {
        
timerAddress FindSendPropInfo("CTerrorPlayer""m_bAdrenalineActive") - 12;
    }
    
    
//timerAddress + 4 = Duration
    //timerAddress + 8 = TimeStamp
    
SetEntDataFloat(clienttimerAddress 4duration);
    
SetEntDataFloat(clienttimerAddress 8GetGameTime() + duration);
    
SetEntProp(clientProp_Send"m_bAdrenalineActive"11);

Oh! Hello Lux! You have very cool plugins, respect to you! Thanks for your help!!
Problem solved!
Mozilla_Firefox 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 06:23.


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