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

DHooks (Dynamic Hooks - Dev Preview)


Post New Thread Reply   
 
Thread Tools Display Modes
Mainstaff
AlliedModders Donor
Join Date: May 2011
Old 08-01-2013 , 21:21   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #131

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... -.-

Last edited by Mainstaff; 08-01-2013 at 21:27.
Mainstaff is offline
klausenbusk
AlliedModders Donor
Join Date: Jan 2011
Old 08-06-2013 , 11:41   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #132

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..
klausenbusk is offline
psychonic

BAFFLED
Join Date: May 2008
Old 08-06-2013 , 11:48   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #133

Quote:
Originally Posted by klausenbusk View Post
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 View Post
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.
psychonic is offline
klausenbusk
AlliedModders Donor
Join Date: Jan 2011
Old 08-06-2013 , 12:34   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #134

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?)
klausenbusk is offline
psychonic

BAFFLED
Join Date: May 2008
Old 08-06-2013 , 13:36   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #135

Quote:
Originally Posted by klausenbusk View Post
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.
psychonic is offline
klausenbusk
AlliedModders Donor
Join Date: Jan 2011
Old 08-08-2013 , 11:12   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #136

Can I hook CanPlayerNameBeSeen and/or CanPlayerHealthBeSeen?
klausenbusk is offline
snusgeneralen
Junior Member
Join Date: Aug 2013
Old 09-14-2013 , 10:13   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #137

Unable to load extension, dhooks could not find interface: IPlayerManager

I got the requirements for this plugins.
snusgeneralen is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 09-15-2013 , 09:15   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #138

Quote:
Originally Posted by snusgeneralen View Post
Unable to load extension, dhooks could not find interface: IPlayerManager

I got the requirements for this plugins.
Make sure sourcemod is updated.
Dr!fter is offline
CyberStars
Senior Member
Join Date: May 2013
Old 10-23-2013 , 05:08   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #139

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.

Last edited by CyberStars; 10-23-2013 at 11:09.
CyberStars is offline
Exelent58
New Member
Join Date: Oct 2013
Old 10-26-2013 , 09:11   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #140

Quote:
Originally Posted by Dr!fter View Post
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



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
Exelent58 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 07:01.


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