Raised This Month: $ Target: $400
 0% 

DHooks (Dynamic Hooks - Dev Preview)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
elymination
New Member
Join Date: Jul 2020
Old 07-26-2020 , 20:03   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #11

using dhooks to hook TraceAttack on CS:GO, but it crashes after the callback is executed (PrintToServer effectively prints something before the server crashes).
what could be the problem? no error message before crashing and no log explaining what would be the culprit

edit: managed to fix the crash, the params weren't correct. here is the correct way to hook TraceAttack, for anyone interested:

Code:
DHOOK_TraceAttack = DHookCreate(offset, HookType_Entity, ReturnType_Int, ThisPointer_CBaseEntity, TraceAttack);
DHookAddParam(DHOOK_TraceAttack, HookParamType_ObjectPtr, -1, DHookPass_ByRef);	// CTakeDamageInfo const&
DHookAddParam(DHOOK_TraceAttack, HookParamType_ObjectPtr, -1, DHookPass_ByRef);	// Vector const&
DHookAddParam(DHOOK_TraceAttack, HookParamType_ObjectPtr, -1, DHookPass_ByVal);	// CGameTrace*

Last edited by elymination; 07-27-2020 at 11:21.
elymination is offline
 



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 12:56.


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