Raised This Month: $51 Target: $400
 12% 

l4d2 Signature search


Post New Thread Reply   
 
Thread Tools Display Modes
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 06-22-2021 , 14:42   Re: l4d2 Signature search
Reply With Quote #11

what am I doing wrong?

PHP Code:
"Games"
{
    
"left4dead2"
    
{
        
"Signatures"
        
{
            
"CTerrorPlayer_OnAdrenalineUsed"
            
{
                
"library"    "server"
                "linux"        "@_ZN13CTerrorPlayer16OnAdrenalineUsedEf"
                "windows"    "\x55\x8B\xEC\x51\x53\x56\x8B\xF1\x8D\x9E\x80\x32\x00\x00"
            

        }
    } 
PHP Code:
#pragma semicolon 1
#include <sourcemod>
#pragma newdecls required
#include <sdktools>

Handle g_hGameConf nullsdkAdrenaline null;

public 
void OnPluginStart()
{
    
RegConsoleCmd("sm_1"sm_1);
    
    
g_hGameConf LoadGameConfigFile("test");
    if(
g_hGameConf == INVALID_HANDLE)
    {
        
SetFailState("Couldn't find the offsets file. Please, check that it is installed correctly.");
    }
    
PrepSDKCall_SetFromConf(g_hGameConfSDKConf_Signature"CTerrorPlayer_OnAdrenalineUsed");
    
PrepSDKCall_AddParameter(SDKType_FloatSDKPass_Plain);  
    
sdkAdrenaline EndPrepSDKCall();
    if(
sdkAdrenaline == INVALID_HANDLE)
    {
        
SetFailState("Unable to find the 'adrenaline' signature, check the file version!");
    }
}

public 
Action sm_1(int clientint args)
{        
    if(
client)
    {
        
SDKCall(sdkAdrenalineclient15.0);
    }
    return 
Plugin_Handled;

Alexmy is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-22-2021 , 14:49   Re: l4d2 Signature search
Reply With Quote #12

Missing "StartPrepSDKCall(SDKCall_Player);" to start the SDK Prep.

I've just added this to left4DHooks. Calling this alone does not increase health and only adds the visual effects. Need to set temp health and fire the event (so other plugins can detect).
__________________

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

Quote:
Originally Posted by Silvers View Post
Missing "StartPrepSDKCall(SDKCall_Player);" to start the SDK Prep.

I've just added this to left4DHooks. Calling this alone does not increase health and only adds the visual effects.
It's not about the health but the speed of the players ' treatment. I noticed after the use of adrenaline, the player's treatment goes faster
Alexmy is offline
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 06-22-2021 , 15:15   Re: l4d2 Signature search
Reply With Quote #14

Quote:
Originally Posted by Silvers View Post
Missing "StartPrepSDKCall(SDKCall_Player);" to start the SDK Prep.

I've just added this to left4DHooks. Calling this alone does not increase health and only adds the visual effects.
Thanks
Alexmy is offline
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 06-22-2021 , 15:16   Re: l4d2 Signature search
Reply With Quote #15

Is it possible to stop the SDK before it finishes working?
Alexmy is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 06-22-2021 , 16:19   Re: l4d2 Signature search
Reply With Quote #16

You want to block the function call? Detour it with DHooks.
__________________
Psyk0tik is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-22-2021 , 18:01   Re: l4d2 Signature search
Reply With Quote #17

I've added into Left4DHooks 2 new forwards which can be used to block this. "L4D_OnVomitedUpo" and "L4D2_OnHitByVomitJar". Will release soon. Also added "L4D2_UseAdrenaline" which can optionally heal or just show the effects.
__________________
Silvers is offline
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 06-23-2021 , 07:00   Re: l4d2 Signature search
Reply With Quote #18

Quote:
Originally Posted by Crasher_3637 View Post
You want to block the function call? Detour it with DHooks.
Thanks for the help I figured it out
Alexmy is offline
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 06-23-2021 , 07:02   Re: l4d2 Signature search
Reply With Quote #19

Quote:
Originally Posted by Silvers View Post
I've added into Left4DHooks 2 new forwards which can be used to block this. "L4D_OnVomitedUpo" and "L4D2_OnHitByVomitJar". Will release soon. Also added "L4D2_UseAdrenaline" which can optionally heal or just show the effects.
I still can't figure out how I can use your Left4DHooks 2.

For example, here is the code for how I can connect Left4DHooks 2?

PHP Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>

Handle g_hGameConf nullsdkAdrenaline null;

public 
void OnPluginStart()
{
    
HookEvent("heal_begin"event_HealBeginEventHookMode_Pre);
    
    
g_hGameConf LoadGameConfigFile("test");
    if(
g_hGameConf == INVALID_HANDLE)
    {
        
SetFailState("Couldn't find the offsets file. Please, check that it is installed correctly.");
    }
    
StartPrepSDKCall(SDKCall_Player);
    
PrepSDKCall_SetFromConf(g_hGameConfSDKConf_Signature"CTerrorPlayer_OnAdrenalineUsed");
    
PrepSDKCall_AddParameter(SDKType_FloatSDKPass_Plain);  
    
sdkAdrenaline EndPrepSDKCall();
    if(
sdkAdrenaline == INVALID_HANDLE)
    {
        
SetFailState("Unable to find the 'adrenaline' signature, check the file version!");
    }
}

public 
event_HealBegin(Handle:event, const String:name[], bool:Broadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    if(
iUpgrade[client][17] > 0)
    {
        
SDKCall(sdkAdrenalineclientGetConVarFloat(FindConVar("first_aid_kit_use_duration")));
    }


Last edited by Alexmy; 06-23-2021 at 07:03.
Alexmy is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 06-23-2021 , 11:08   Re: l4d2 Signature search
Reply With Quote #20

Quote:
Originally Posted by Alexmy View Post
I still can't figure out how I can use your Left4DHooks 2.

For example, here is the code for how I can connect Left4DHooks 2?
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.
__________________

Last edited by Silvers; 06-23-2021 at 11:38.
Silvers 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 13:05.


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