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

l4d2 Signature search


Post New Thread Reply   
 
Thread Tools Display Modes
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 06-23-2021 , 13:19   Re: l4d2 Signature search
Reply With Quote #21

Quote:
Originally Posted by Silvers View Post
PHP Code:
#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>
#include <left4dhooks>

int g_iUpgrade[MAXPLAYERS+1][20]; // Don't know how you declared this

public void OnPluginStart()
{
    
HookEvent("heal_begin"Event_HealBegin);
}

public 
Action Event_HealBegin(Event eventchar[] namebool Broadcast)
{
    
int client GetClientOfUserId(GetEventInt(event"userid"));
    if(
g_iUpgrade[client][17] > 0)
    {
        
L4D2_UseAdrenaline(client);
    }
}

// And you wanted to block Boomer vomit:
public Action L4D_OnVomitedUpon(int victimint &attackerbool &boomerExplosion)
{
    return 
Plugin_Handled;

Requires left4dhooks 1.42. Also changed to new syntax.
Thanks, it looks beautiful. This is a test code, I did not declare all the variables. But how can I specify the usage time L4D2_UseAdrenaline(client)?
Alexmy is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-23-2021 , 15:18   Re: l4d2 Signature search
Reply With Quote #22

Quote:
Originally Posted by Alexmy View Post
Thanks, it looks beautiful. This is a test code, I did not declare all the variables. But how can I specify the usage time L4D2_UseAdrenaline(client)?
PHP Code:
/**
 * @brief Gives the player adrenaline effect and health benefits.
 *
 * @param client    Client id to affect
 * @param fTime        Duration of screen effects (game default: 15.0 - Cvar: "adrenaline_duration")
 * @param heal        True = give health benefits and fire "adrenaline_used" event. False = only screen effects.
 *
 * @return            True on success, false otherwise
 */
// L4D2 only.
native void L4D2_UseAdrenaline(int clientfloat fTime 15.0bool heal true); 
If you want to modify heal time, change "pain_pills_decay_rate" cvar before calling "L4D2_UseAdrenaline", but reset to previous value. You can change how much it heals with "pain_pills_health_value" cvar, again reset after using. These are the games cvars to control pills/adrenaline.
__________________

Last edited by Silvers; 06-23-2021 at 15:18.
Silvers is offline
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 06-25-2021 , 06:52   Re: l4d2 Signature search
Reply With Quote #23

Quote:
Originally Posted by Silvers View Post
PHP Code:
/**
 * @brief Gives the player adrenaline effect and health benefits.
 *
 * @param client    Client id to affect
 * @param fTime        Duration of screen effects (game default: 15.0 - Cvar: "adrenaline_duration")
 * @param heal        True = give health benefits and fire "adrenaline_used" event. False = only screen effects.
 *
 * @return            True on success, false otherwise
 */
// L4D2 only.
native void L4D2_UseAdrenaline(int clientfloat fTime 15.0bool heal true); 
If you want to modify heal time, change "pain_pills_decay_rate" cvar before calling "L4D2_UseAdrenaline", but reset to previous value. You can change how much it heals with "pain_pills_health_value" cvar, again reset after using. These are the games cvars to control pills/adrenaline.

I have such a question. When using adrenaline, the configuration does not work immediately. Only with repeated use, the player gets up more dexterously. Is there any way to fix this?

Last edited by Alexmy; 06-26-2021 at 12:11.
Alexmy is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-25-2021 , 12:36   Re: l4d2 Signature search
Reply With Quote #24

Quote:
Originally Posted by Alexmy View Post
I have such a question. When using adrenaline, the configuration does not work immediately. Only with repeated use, the player gets up more dexterously. Is there any way to fix this?
I didn't notice this, worked immediately for me.
__________________
Silvers is offline
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 06-25-2021 , 13:09   Re: l4d2 Signature search
Reply With Quote #25

Quote:
Originally Posted by Silvers View Post
I didn't notice this, worked immediately for me.
Only the effect on the screen is triggered and that's it. I tried it like this L4D2_UseAdrenaline(client, 5.0, false); First of all, only the effect on the screen is triggered and that's it. But if you repeat the function immediately, the sharpness of the player immediately increases. I am also concerned about the same problem with the server settings first_aid_kit_use_duration
Alexmy is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-25-2021 , 17:24   Re: l4d2 Signature search
Reply With Quote #26

Quote:
Originally Posted by Alexmy View Post
Only the effect on the screen is triggered and that's it. I tried it like this L4D2_UseAdrenaline(client, 5.0, false); First of all, only the effect on the screen is triggered and that's it. But if you repeat the function immediately, the sharpness of the player immediately increases. I am also concerned about the same problem with the server settings first_aid_kit_use_duration


PHP Code:
/**
 * @brief Gives the player adrenaline effect and health benefits.
 *
 * @param client    Client id to affect
 * @param fTime        Duration of screen effects (game default: 15.0 - Cvar: "adrenaline_duration")
 * @param heal        True = give health benefits and fire "adrenaline_used" event. False = only screen effects.
 *
 * @return            True on success, false otherwise
 */
// L4D2 only.
native void L4D2_UseAdrenaline(int clientfloat fTime 15.0bool heal true); 
Please read the native description and param options.
__________________
Silvers is offline
gamer_kanelita
Senior Member
Join Date: Jun 2019
Location: Peru
Old 06-29-2021 , 11:37   Re: l4d2 Signature search
Reply With Quote #27

I use this page https://spider.limetech.io/ to compile but I get an error in line 7, also how do I bind the useadrenaline to write it in the console? :llorar::llorar:
gamer_kanelita is offline
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 07-26-2021 , 11:50   Re: l4d2 Signature search
Reply With Quote #28

Can someone help me find the signature I need. When a player helps an incapacitated player to climb. And is it possible to use it on yourself to get up without the help of another survivor?
__________________
[/URL]
Alexmy is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 07-26-2021 , 12:57   Re: l4d2 Signature search
Reply With Quote #29

...I looked l4d2 speedrun from YT, seems if all your teammates are down, that cliff hanging effect stop working :/
Bacardi 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 07:01.


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