AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [L4D2] How apply adrenaline effect ?? (https://forums.alliedmods.net/showthread.php?t=327928)

Mozilla_Firefox 10-17-2020 10:54

[L4D2] How apply adrenaline effect ??
 
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 :(

Lux 10-18-2020 08:29

Re: [L4D2] How apply adrenaline effect ??
 
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);



Mozilla_Firefox 10-18-2020 08:57

Re: [L4D2] How apply adrenaline effect ??
 
Quote:

Originally Posted by Lux (Post 2721773)
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!


All times are GMT -4. The time now is 04:39.

Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.