AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Extensions (https://forums.alliedmods.net/forumdisplay.php?f=134)
-   -   DHooks (Dynamic Hooks - Dev Preview) (https://forums.alliedmods.net/showthread.php?t=180114)

Mainstaff 08-01-2013 21:21

Re: DHooks (Dynamic Hooks - Dev Preview)
 
Hi,

After hooking the function CVEngineServer::GetMapEntitiesString I am trying to get the return value which should be a string.
Code:

    // Get the pristine map entity lump string.  (e.g., used by CS to reload the map entities when restarting a round.)
    virtual const char*    GetMapEntitiesString() = 0;

But I get this error:
Code:

Native "DHookGetReturnString" reported: Invalid param type to get. Param is not a string.
Any idea?

Edit: My fault, wrong return type in DHookCreate set... -.-

klausenbusk 08-06-2013 11:41

Re: DHooks (Dynamic Hooks - Dev Preview)
 
Is you planing adding a Gamedata autoupdate function? If I remember correctly sdkhooks have that..
As berni have create a "Virtual Offsets Automated Dumper", you already have a source..

psychonic 08-06-2013 11:48

Re: DHooks (Dynamic Hooks - Dev Preview)
 
Quote:

Originally Posted by klausenbusk (Post 2006937)
Is you planing adding a Gamedata autoupdate function? If I remember correctly sdkhooks have that..

DHooks has very little gamedata itself. It puts the burden on the consuming plugins to create their own hooks with their own gamedata (but allowing for custom hooks instead of only being able to choose from a set provided, like in SDKHooks).

Quote:

Originally Posted by klausenbusk (Post 2006937)
As berni have create a "Virtual Offsets Automated Dumper", you already have a source..

That site is often down and games often out of date. It also only provides the functions for the player vtable, and has incorrect offsets where multiple inheritance is involved.

klausenbusk 08-06-2013 12:34

Re: DHooks (Dynamic Hooks - Dev Preview)
 
Another question, DHooks can't just use the EntityListeners offsets from sdkhooks.games/common.games.txt and FieldOffset offsets from sdktools.games/engine.<engine>.txt? (Is GetTENext and FieldOffset the same?)

psychonic 08-06-2013 13:36

Re: DHooks (Dynamic Hooks - Dev Preview)
 
Quote:

Originally Posted by klausenbusk (Post 2006981)
Another question, DHooks can't just use the EntityListeners offsets from sdkhooks.games/common.games.txt and FieldOffset offsets from sdktools.games/engine.<engine>.txt? (Is GetTENext and FieldOffset the same?)

No plugin or extension should be relying on gamedata existing from another plugin or extension. Just because something is in another file now does not mean that it will always be there or with the same name.

klausenbusk 08-08-2013 11:12

Re: DHooks (Dynamic Hooks - Dev Preview)
 
Can I hook CanPlayerNameBeSeen and/or CanPlayerHealthBeSeen?

snusgeneralen 09-14-2013 10:13

Re: DHooks (Dynamic Hooks - Dev Preview)
 
Unable to load extension, dhooks could not find interface: IPlayerManager

I got the requirements for this plugins.

Dr!fter 09-15-2013 09:15

Re: DHooks (Dynamic Hooks - Dev Preview)
 
Quote:

Originally Posted by snusgeneralen (Post 2034424)
Unable to load extension, dhooks could not find interface: IPlayerManager

I got the requirements for this plugins.

Make sure sourcemod is updated.

CyberStars 10-23-2013 05:08

Re: DHooks (Dynamic Hooks - Dev Preview)
 
Hello,

I've tried DHooks with Voiceannounce (https://forums.alliedmods.net/showthread.php?p=1776276) for Dota 2 and it gives an error "Native "SDKCall" reported: Invalid Handle 0 (error 4)".

Any help?

Thanks.

Exelent58 10-26-2013 09:11

Re: DHooks (Dynamic Hooks - Dev Preview)
 
Quote:

Originally Posted by Dr!fter (Post 1671347)
I have fixed a few. There was one in the actual hooking, and another in getting the params/return values. If there is more feel free to run valgrind since I couldnt see anymore. I tried running valgrind but not sure if I did it correctly since I never used it :P



Try 1.0.3-alpha it should be fixed.

Also anyone running anything before 1.0.3-alpha should update to it, since the memory leak was pretty big.

Where i can get that version of dhooks?
Error:
Code:

[SM] Unable to load plugin "sf2.smx": Required extension "dhooks" file("dhooks.ext") not running


All times are GMT -4. The time now is 23:24.

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