View Single Post
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