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

DHooks (Dynamic Hooks - Dev Preview)


Post New Thread Reply   
 
Thread Tools Display Modes
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 11-08-2021 , 09:43   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #861

Could you paste the output of "sm exts list" and "sm version" from the server console please?
__________________
Peace-Maker is offline
Schwede
Member
Join Date: Oct 2021
Location: germany
Old 11-08-2021 , 11:24   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #862

hello yes I am happy about any help
Edith= if you ask like that, some plugin is missing or it is a false one

SourceMod Version Information:
SourceMod Version: 1.10.0.6516
SourcePawn Engine: 1.10.0.6516, jit-x86 (build 1.10.0.6516)
SourcePawn API: v1 = 5, v2 = 12
Compiled on: Oct 6 2021 13:42:22
Built from: https://github.com/alliedmodders/sou...commit/52fad58
Build ID: 6516:52fad58
http://www.sourcemod.net/
sm exts list:
[SM] Displaying 10 extensions:
[01] Automatic Updater (1.10.0.6516): Updates SourceMod gamedata files
[02] Webternet (1.10.0.6516): Extension for interacting with URLs
[03] CS Tools (1.10.0.6516): CS extended functionality
[04] BinTools (1.10.0.6516): Low-level C/C++ Calling API
[05] SDK Tools (1.10.0.6516): Source SDK Tools
[06] Top Menus (1.10.0.6516): Creates sorted nested menus
[07] DHooks (2.2.0-detours17): Dynamic Hooks
[08] SDK Hooks (1.10.0.6516): Source SDK Hooks
[09] Client Preferences (1.10.0.6516): Saves client preference settings
[10] SQLite (1.10.0.6516): SQLite Driver

Last edited by Schwede; 11-08-2021 at 13:26.
Schwede is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 11-08-2021 , 15:03   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #863

That looks like it's up and running. Are you looking at some old log entry before you had the extension installed? Check the timestamp. Otherwise post the output of "sm plugins list" as well please.
__________________
Peace-Maker is offline
Schwede
Member
Join Date: Oct 2021
Location: germany
Old 11-08-2021 , 16:01   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #864

Today's logs show me that everything is ok, but that every day before an error.
I just do not understand
sorry but that irritates me. But if they say it's going it's fine.

L 11/07/2021 - 00:01:13: SourceMod error session started
L 11/07/2021 - 00:01:13: Info (map "de_dust2") (file "/home/container/csgo/addons/sourcemod/logs/errors_20211107.log")
L 11/07/2021 - 00:01:13: [SM] Unable to load plugin "csgo_nextmapvote_disable.smx": Required extension "dhooks" file("dhooks.ext") not running
L 11/07/2021 - 00:04:49: Error log file session closed.

ftp image: https://prnt.sc/1yt2t9q
sm bild: https://prnt.sc/1yt3k0k
__________________
respect is not a one-way street - have a nice day and have fun

Last edited by Schwede; 11-08-2021 at 17:06.
Schwede is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 11-17-2021 , 07:37   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #865

DHooks is now included with SourceMod 1.11.6820. Previous versions are unsupported.


Please use SourceMod's issue tracker on GitHub for any new issues.


The merged version includes additional changes that weren't released in a new version yet.
Changelog 1.11.6820:
  • Added new native "DHookParam.GetAddress" to get the address of a pointer parameter. (Thanks LuqS #24)
  • Fix error reporting on invalid entity (Thanks FortyTwoFortyTwo #25)
__________________
Peace-Maker is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 11-18-2021 , 06:33   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #866

Code:
                                   .''.
       .''.      .        *''*    :_\/_:     .
      :_\/_:   _\(/_  .:.*_\/_*   : /\ :  .'.:.'.
  .''.: /\ :    /)\   ':'* /\ *  : '..'.  -=:o:=-
 :_\/_:'.:::.  | ' *''*    * '.\'/.'_\(/_ '.':'.'
 : /\ : :::::  =  *_\/_*     -= o =- /)\     '  *
  '..'  ':::' === * /\ *     .'/.\'.  ' ._____
      *        |   *..*         :       |.   |' .---"|
        *      |     _           .--'|  ||   | _|    |
        *      |  .-'|       __  |   |  |    ||      |
     .-----.   |  |' |  ||  |  | |   |  |    ||      |
 ___'       ' /"\ |  '-."".    '-'   '-.'    '`      |____
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas is offline
lightphoenix2
Member
Join Date: Feb 2016
Old 11-20-2021 , 00:31   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #867

Hi,

I'm sorry to ask this, can anyone tell me if I need to uninstall Dhooks if I have the latest version of Sourcemod?

Thanks!
lightphoenix2 is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 11-21-2021 , 08:51   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #868

No, the file is called the same and you probably replaced it already if you uploaded the extensions folder of the new sourcemod release. You can check the output of "sm exts list" for DHooks version number. if it matches the sourcemod version number, you're already using the included version.
__________________
Peace-Maker is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 11-28-2021 , 05:51   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #869

Has there been some sort of breaking change with this transition?

An old plugin of mines that used to work seems to be causing crashes now.

I hooked CBaseEntity::IsDeflectable() and through some gameplay testing have found that it is quite just my own isolated plugin for this that crashes... with crash logs pointing at BaseCombatCharacter::IsHiddenByFog(CBaseEntit y*) for some reason.

Zero reference to IsDeflectable in my crash logs but I know for a fact it's this plugin causing them.

My offsets seem to be correct according to the vtable dumper.

Here is pretty much my full plugin for it. It seems to compile fine with sm1.11 too, which I am running. But it was also broken with sm1.10 and the version of DHooks before I upgraded to the sm1.11 one.

It's been ages since I tried DHook stuff and I forget how I figured any of this out <.<

Code:
"Games"
{
    "tf"
    {
        "Offsets"
        {
            "CBaseEntity::IsDeflectable()" // Works for CTFPlayer too, basically any entity.
            {
                "library" "server"
                "windows"   "152"
                "linux"     "153"
                "mac"       "153"
            }
        }
    }
}
PHP Code:
#pragma semicolon 1
#include <sourcemod>
#include <dhooks>

#undef REQUIRE_PLUGIN
#include <saxtonhale>
#define REQUIRE_PLUGIN

#define FL_CROUCHWALKING (FL_ONGROUND|FL_DUCKING)

static Handle:g_fnIsDeflectable;
static 
bool:g_bIsVSHRunning;

public 
OnPluginStart()
{
    
OnPluginStart_RegisterIsDeflectable();
}

public 
OnClientPostAdminCheck(iClient)
{
    
DHookEntity(g_fnIsDeflectabletrueiClient);
}

public 
OnMapStart()
{
    for (new 
iClient 1iClient <= MaxClientsiClient++)
    {
        if (
IsClientInGame(iClient))
        {
            
OnClientPostAdminCheck(iClient);
        }
    }
}

stock OnPluginStart_RegisterIsDeflectable()
{
    new 
Handle:hGameData LoadGameConfigFile("airblast.data");
    if (
hGameData == INVALID_HANDLE)
    {
        
SetFailState("Unable to load required gamedata (airblast.data.txt)");
    }

    new 
iOffset GameConfGetOffset(hGameData"CBaseEntity::IsDeflectable()");
    if (
iOffset == -1)
    {
        
SetFailState("Failed To Get Offset For CBaseEntity::IsDeflectable()");
    }
    
    
g_fnIsDeflectable DHookCreate(iOffsetHookType_EntityReturnType_BoolThisPointer_CBaseEntityOnCheckIfDeflectable);

    
CloseHandle(hGameData);
}

public 
MRESReturn:OnCheckIfDeflectable(iVictimHandle:hReturnHandle:hParams)
{
    
//PrintToChatAll("IS DEFLECTABLE?!");

    
if (!g_bIsVSHRunning || VSH_GetRoundState() != VSHRState_Active || VSH_GetBossType(iVictim) != BossType_Main)
    {
        return 
MRES_Ignored;
    }

    if (
VSH_IsBossAnchored())
    {
        
//PrintToChatAll("Anchored!");
        
DHookSetReturn(hReturnfalse);
        return 
MRES_Override;
    }

    if (
VSH_IsBossSuperJumping())
    {
        
//PrintToChatAll("Anchored!");
        
DHookSetReturn(hReturnfalse);
        return 
MRES_Override;
    }

    return 
MRES_Ignored;
}

public 
OnAllPluginsLoaded()
{
    
g_bIsVSHRunning LibraryExists("saxtonhale");
}

public 
OnLibraryAdded(const String:name[])
{
    if (
StrEqual(name"saxtonhale"))
    {
        
g_bIsVSHRunning true;
    }
}

public 
OnLibraryRemoved(const String:name[])
{
    if (
StrEqual(name"saxtonhale"))
    {
        
g_bIsVSHRunning false;
    }

__________________

Last edited by Chdata; 11-28-2021 at 05:54.
Chdata is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 11-28-2021 , 09:11   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #870

Quote:
Originally Posted by Chdata View Post
My offsets seem to be correct according to the vtable dumper.
The binaries on the vtable dumper are from October; there was a breaking change in the CBaseEntity vtable in the middle of November.

The correct offsets for CBaseEntity::IsDeflectable() are 155 on Windows and 156 on Linux / Mac.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 11-28-2021 at 09:13.
nosoop 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 17:28.


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