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

DHooks (Dynamic Hooks - Dev Preview)


Post New Thread Reply   
 
Thread Tools Display Modes
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 11-13-2015 , 16:33   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #391

Updated. The major fix is raw hooks were completely broken before. They should now be fixed, this should fix the bugs that some people randomly experienced where "hooks fire sometimes then don't". The problem was hooks were being incorrectly compared with other hooks so if a hook had a different interface address but same offset it would return the hook that was already set. This was more noticeable when hooking stuff on IClient since you need the interface for the client but everything else would stay the same. Also fixed is not being able to set vector values within objects.

Quote:
Originally Posted by Powerlord View Post
Actually, that reminds me... there's still an open pull request to fix building DHooks2 against SourceMod 1.7 and 1.8 both. Right now, you can't build against 1.8 because some files DHooks2 uses moved in 1.8.

I assume this pull request is still relevant as the last time the AMBuildScript was touched was before I created that pull request.

I'm totally not posting this just to move the now-deleted spambot post off the most recent post list for this board.
As a note i didn't forget about it, just been busy/lazy and i was wanting to wait for a 1.8 release (but that is no longer gonna be a thing) so ill try to add it in this weekend.
Dr!fter is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 11-14-2015 , 14:37   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #392

Quote:
Originally Posted by Powerlord View Post
I'm totally not posting this just to move the now-deleted spambot post off the most recent post list for this board.
I'm totally doing this right now.

Also, this extension works with only virtual functions or... what restrictions are there?
Potato Uno is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 11-14-2015 , 17:45   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #393

The limitations are it needs to be virtual and you need to have a way to get the interface address.
Dr!fter is offline
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 11-20-2015 , 13:21   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #394

Hi, I am install dhook on win and on linux, for CS:GO , sm exts list showed that DHook uploaded

Quote:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <dhooks>

// int CBaseCombatCharacter::BloodColor(void)
new Handle:hBloodColor;

public OnPluginStart()
{
new Handle:temp = LoadGameConfigFile("dhooks-test.games");

if(temp == INVALID_HANDLE)
{
SetFailState("Why you no has gamedata?");
}

new offset;

offset = GameConfGetOffset(temp, "BloodColor");
hBloodColor = DHookCreate(offset, HookType_Entity, ReturnType_Int, ThisPointer_CBaseEntity, BloodColorPost);

CloseHandle(temp);

}

public OnClientPutInServer(client)
{
DHookEntity(hBloodColor, true, client);
}
// int CBaseCombatCharacter::BloodColor(void)
public MRESReturn:BloodColorPost(pThis, Handle:hReturn)
{
DHookSetReturn(hReturn, 2);
return MRES_Supercede;
}
But when i connected , server crashed without errors
__________________
gubka is offline
Send a message via ICQ to gubka
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 11-21-2015 , 02:20   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #395

Quote:
Originally Posted by gubka View Post
Hi, I am install dhook on win and on linux, for CS:GO , sm exts list showed that DHook uploaded



But when i connected , server crashed without errors
Maybe you need to update the gamedata offset for BloodColor.

The current offset for CS:GO is
Code:
CBaseCombatCharacter::BloodColor() 	windows=72   linux=73   mac=73
__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.


Last edited by Franc1sco; 11-21-2015 at 02:22.
Franc1sco is offline
Send a message via MSN to Franc1sco
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 11-22-2015 , 11:13   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #396

Din't work, just crash server
__________________
gubka is offline
Send a message via ICQ to gubka
xerox8521
Senior Member
Join Date: Sep 2011
Old 11-26-2015 , 10:56   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #397

How would i properly setup this one? _ZN11CHL2MPRules16ShowEndRoundMenuEPKc from what i think i understood is (take from _ZN13CHL2MP_Player13GiveNamedItemEPKc) that it returns an entity and requires a const char pointer as param. Thing is now when it gets called the handle become invalid (hParams) and even if i dont try to print the param it blocks the ingame HUD Display aswell as the sound being played.

Last edited by xerox8521; 11-26-2015 at 11:28.
xerox8521 is offline
keygens
Senior Member
Join Date: Mar 2010
Location: Somewhere
Old 12-18-2015 , 01:48   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #398

Code:
     
Undefined symbol : engine
what that mean?
keygens is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 12-18-2015 , 02:12   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #399

I'm pretty sure you blew a head gasket!!!
__________________
Neuro Toxin is offline
Chaya_
BANNED
Join Date: Jul 2014
Location: Germany
Old 12-20-2015 , 11:05   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #400

L 12/20/2015 - 17:02:02: SourceMod error session started
L 12/20/2015 - 17:02:02: Info (map "workshop/125488374/de_dust2_se") (file "errors_20151220.log")
L 12/20/2015 - 17:02:02: [SM] Plugin encountered error 25: Call was aborted
L 12/20/2015 - 17:02:02: [SM] Native "SetFailState" reported: Failed to get CreateInterface
L 12/20/2015 - 17:02:02: [SM] Displaying call stack trace for plugin "dhooks-test.smx":
L 12/20/2015 - 17:02:02: [SM] [0] Line 99, dhooks-test.sp::OnPluginStart()
Chaya_ is offline
Send a message via ICQ to Chaya_ Send a message via Skype™ to Chaya_
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 18:02.


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