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

DHooks (Dynamic Hooks - Dev Preview)


Post New Thread Reply   
 
Thread Tools Display Modes
Ryan.
Member
Join Date: Jan 2018
Old 06-11-2018 , 02:39   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #591

Thank you! The addition of dynamic detours is incredibly powerful. I was able to finish my Backpack plugin that I previously found impossible. Thanks for the support and taking the time to build this extension!
__________________
Ryan. is offline
spumer
Senior Member
Join Date: Aug 2011
Old 06-17-2018 , 04:22   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #592

Any plans merge Dynamic hooks into upstream?
__________________
spumer is offline
lobnico
Member
Join Date: Sep 2012
Old 06-25-2018 , 17:03   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #593

Program received signal SIGSEGV, Segmentation fault.
Native_GetParamObjectPtrVarVector (pContext=0xd5647e8, params=<optimized out>)
at /home/peace/git/dhooks2-stripped/natives.cpp:1139
1139 /home/peace/git/dhooks2-stripped/natives.cpp: No such file or directory.

Not sure yet what this is about
__________________
lobnico is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 06-26-2018 , 05:24   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #594

Can you please post a complete testcase for debugging?
__________________
Peace-Maker is offline
gubka
Veteran Member
Join Date: Jan 2012
Location: Russia
Old 07-05-2018 , 23:10   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #595

Hello Guyz, anyone know how to fix that ?
Quote:
WeaponDHookOnDropPost
L 07/06/2018 - 06:06:27: [SM] Exception reported: Trying to get value for null pointer.
PHP Code:
hDHookWeaponDropPost DHookCreate(DHook_WeaponDropHookType_EntityReturnType_VoidThisPointer_IgnoreWeaponDHookOnDropPost);
    
DHookAddParam(hDHookWeaponDropPostHookParamType_CBaseEntity);


I also tryed

hDHookWeaponDropPost 
DHookCreate(DHook_WeaponDropHookType_EntityThisPointer_CBaseEntityThisPointer_IgnoreWeaponDHookOnDropPost);
    
DHookAddParam(hDHookWeaponDropPostHookParamType_CBaseEntity); 

Also if i use that code in OnPluginStart I am not able to connect, but i didnt see any crash
DHookAddEntityListener(ListenType_Created, WeaponsOnCreated);
DHookAddEntityListener(ListenType_Deleted, WeaponsOnDeleted);

When i use them at MapStart Is OK

When i use only ListenType_Created, I am not able to connect

Game CS:GO what could be wrong?


And I also have a misunderstanding how to block trace or allow the trace in the TraceAttack, anyone can help me with that pls? I need to see correct method for that hook. Thanks a million

CBasePlayer::TraceAttack(CTakeDamageInfo &inputInfo, const Vector &vecDir, trace_t *ptr, CDmgAccumulator *pAccumulator )
Quote:
//hDHookTraceAttack = DHookCreate(DHook_TraceAttack, HookType_Entity, ReturnType_Int, ThisPointer_CBaseEntity, DamageDHookOnTraceAttack);
//DHookAddParam(hDHookTraceAttack, HookParamType_ObjectPtr, -1, DHookPass_ByRef);
//DHookAddParam(hDHookTraceAttack, HookParamType_VectorPtr);
//DHookAddParam(hDHookTraceAttack, HookParamType_Object, 20, DHookPass_ByVal|DHookPass_ODTOR|DHookPass_OCT OR|DHookPass_OASSIGNOP); //trace_t is a union of 12 (float[3]) ??????
__________________

Last edited by gubka; 07-06-2018 at 11:00.
gubka is offline
Send a message via ICQ to gubka
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 07-07-2018 , 06:49   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #596

Quote:
Originally Posted by gubka View Post
Hello Guyz, anyone know how to fix that ?


PHP Code:
hDHookWeaponDropPost DHookCreate(DHook_WeaponDropHookType_EntityReturnType_VoidThisPointer_IgnoreWeaponDHookOnDropPost);
    
DHookAddParam(hDHookWeaponDropPostHookParamType_CBaseEntity);


I also tryed

hDHookWeaponDropPost 
DHookCreate(DHook_WeaponDropHookType_EntityThisPointer_CBaseEntityThisPointer_IgnoreWeaponDHookOnDropPost);
    
DHookAddParam(hDHookWeaponDropPostHookParamType_CBaseEntity); 

Also if i use that code in OnPluginStart I am not able to connect, but i didnt see any crash
DHookAddEntityListener(ListenType_Created, WeaponsOnCreated);
DHookAddEntityListener(ListenType_Deleted, WeaponsOnDeleted);

When i use them at MapStart Is OK

When i use only ListenType_Created, I am not able to connect

Game CS:GO what could be wrong?
Can you please post a complete testcase for debugging?

You can check if a parameter is NULL using the DHookIsNullParam native before trying to get its value.

Your second weapondrop hook try isn't using valid enums. Which dhooks version are you running exactly? Why don't you use sdkhooks which already provides both of these hooks?
__________________
Peace-Maker is offline
jking
AlliedModders Donor
Join Date: Jan 2012
Old 07-23-2018 , 14:17   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #597

error with latest SM/MM: btw we don't actually compile the test.sp and place it in the plugins directory, I seem to recall now that we don't but would like clarification.

Code:
L 07/23/2018 - 12:14:41: SourceMod error session started
L 07/23/2018 - 12:14:41: Info (map "c5m1_waterfront") (file "errors_20180723.log")
L 07/23/2018 - 12:14:41: [SM] Exception reported: Failed to get CreateInterface
L 07/23/2018 - 12:14:41: [SM] Blaming: dhooks-test.smx
L 07/23/2018 - 12:14:41: [SM] Call stack trace:
L 07/23/2018 - 12:14:41: [SM]   [0] SetFailState
L 07/23/2018 - 12:14:41: [SM]   [1] Line 99, dhooks-test.sp::OnPluginStart
L 07/23/2018 - 12:14:41: [SM] Unable to load plugin "dhooks-test.smx": Error detected in plugin startup (see error logs)
Code:
meta list
Listing 7 plugins:
  [01] L4D2 fps_max unlocker (1.0.0.0) by Nuclearfallout Enterprises, Inc.
  [02] L4DToolZ (1.0.0.9h-unknown) by Ivailosp
  [03] SourceMod (1.9.0.6245) by AlliedModders LLC
  [04] Left 4 Downtown 2 Extension (0.5.4.2) by Igor "Downtown1" Smirnov / Andrew "XBetaAlpha" Burrows / AtomicStryker / Michael "ProdigySim" Busby
  [05] SDK Tools (1.9.0.6245) by AlliedModders LLC
  [06] DHooks (2.2.0) by Dr!fter
  [07] SDK Hooks (1.9.0.6245) by AlliedModders LLC

sm plugins list
[SM] Listing 26 plugins:
  01 "Admin File Reader" (1.9.0.6245) by AlliedModders LLC
  02 "Admin Help" (1.9.0.6245) by AlliedModders LLC
  03 "Admin Menu" (1.9.0.6245) by AlliedModders LLC
  04 "Anti-Flood" (1.9.0.6245) by AlliedModders LLC
  05 "Basic Ban Commands" (1.9.0.6245) by AlliedModders LLC
  06 "Basic Chat" (1.9.0.6245) by AlliedModders LLC
  07 "Basic Comm Control" (1.9.0.6245) by AlliedModders LLC
  08 "Basic Commands" (1.9.0.6245) by AlliedModders LLC
  09 "Basic Info Triggers" (1.9.0.6245) by AlliedModders LLC
  10 "Basic Votes" (1.9.0.6245) by AlliedModders LLC
  11 "Client Preferences" (1.9.0.6245) by AlliedModders LLC
  12 <Error> "dhooks-test.smx"
  13 "Survivor set enforcer" (1.0)
  14 "Fun Commands" (1.9.0.6245) by AlliedModders LLC
  15 "Fun Votes" (1.9.0.6245) by AlliedModders LLC
  16 "L4D2 Gun Control" (2.0) by MasterMind420, AtomicStryker
  17 "[L4D2] Pistol Reloading" (1.1) by MasterMind420, Ludastar, DeathChaos25, AtomicStryker
  18 "[L4D & L4D2] Gear Transfer" (1.6.0) by SilverShot
  19 "Multiple Equipment" (3.6) by MasterMind420 & Ludastar & Pan Xiaohai & Marcus101RR
  20 "Super Versus Reloaded" (1.8.15.5) by DDRKhat, Marcus101RR, and Merudo
  21 "[L4D2] CSM The Passing Fix" by DeathChaos25, Merudo
  22 "Player Commands" (1.9.0.6245) by AlliedModders LLC
  23 "Reserved Slots" (1.9.0.6245) by AlliedModders LLC
  24 "Scene Processor" (1.33) by Buster "Mr. Zero" Nielsen
  25 "Sound Commands" (1.9.0.6245) by AlliedModders LLC
  26 "Survivor Chat Select" (1.6.1) by DeatChaos25, Mi123456 & Merudo
Errors:
dhooks-test.smx: Error detected in plugin startup (see error logs)

Last edited by jking; 07-23-2018 at 14:36.
jking is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 07-23-2018 , 15:28   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #598

That is expected, it is a code sample of the DHooks API and does not contain up-to-date gamedata for every game. You should not be trying to load it.
__________________
asherkin is offline
jking
AlliedModders Donor
Join Date: Jan 2012
Old 07-23-2018 , 16:07   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #599

Quote:
Originally Posted by asherkin View Post
That is expected, it is a code sample of the DHooks API and does not contain up-to-date gamedata for every game. You should not be trying to load it.
Understood and thank you asherkin for this clarification.
jking is offline
jking
AlliedModders Donor
Join Date: Jan 2012
Old 07-31-2018 , 13:54   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #600

Are there any circumstances that if installed correctly, DHooks would not show up under "meta list"? I had it earlier showing up intermittently, now not at all.

update: I've since found out that it won't load if it's not being utilized atm.

Last edited by jking; 07-31-2018 at 14:50.
jking is offline
Reply


Thread Tools
Display Modes

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 06:53.


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