Raised This Month: $ Target: $400
 0% 

DHooks (Dynamic Hooks - Dev Preview)


Post New Thread Reply   
 
Thread Tools Display Modes
Crowii
Member
Join Date: Nov 2015
Location: England.
Old 02-22-2016 , 05:47   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #441

Quote:
Originally Posted by asherkin View Post
I suggest downloading the builds rather than the source code.
Way ahead of you, did some snooping and found the builds, I'm blind.

However I do get this show up in console when trying to load a plugin which requires this.

[SM] Plugin franug_hats.smx failed to load: Required extension "dhooks" file("dhooks.ext") not running.
Crowii is offline
Potato Uno
Veteran Member
Join Date: Jan 2014
Location: Atlanta, Georgia
Old 02-23-2016 , 12:42   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #442

You didn't install it properly.
Potato Uno is offline
Merudo
Senior Member
Join Date: Feb 2016
Old 03-18-2016 , 16:27   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #443

I'd be great if the documentation of this extension would be a bit better. A quick description of the natives and what they do would be a start.

Right now new users of the extension have to study the source code to figure it out.
__________________

Last edited by Merudo; 03-18-2016 at 16:30.
Merudo is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 03-18-2016 , 17:12   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #444

All the natives appear to have pretty complete documentation, it's no tutorial (it was written for people who already know SourceHook / SDKCalls) but it's all covered.
__________________
asherkin is offline
Merudo
Senior Member
Join Date: Feb 2016
Old 03-18-2016 , 17:55   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #445

Sorry, I just meant I wish the documentation was in the thread not only in the source code.

I'm trying to find the offset for SetModel in L4D, do you have any tips that could help me?

EDIT: Found it from this, it's 26
__________________

Last edited by Merudo; 03-18-2016 at 18:10.
Merudo is offline
StrikerMan780
AlliedModders Donor
Join Date: Jul 2009
Location: Canada
Old 04-09-2016 , 15:24   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #446

https://forums.alliedmods.net/showthread.php?t=281358

For some reason, the hook stops firing after a while of playing. I'm not sure why this is.

Last edited by StrikerMan780; 04-10-2016 at 16:45.
StrikerMan780 is offline
xerox8521
Senior Member
Join Date: Sep 2011
Old 04-17-2016 , 09:21   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #447

For some reason it crashs when trying to access float values as params. The hook works until i try to access the float param.

Tested DHookGetParam(hParams,0) which infact returns 4 for the param count

Game: L4D2
OS: Linux Debian 7
SourceMod Version: 1.7.3-dev+5302
Metamod:Source version 1.10.6
DHooks Version: 2.0.4

Function im trying to hook:

PHP Code:
450    CFirstAidKit::OnStartAction(CBaseBackpackItem::BackpackItemActionType,CTerrorPlayer *,CBaseEntity *,float
Code:

PHP Code:
// plugin start
    
hCFirstAidKit DHookCreate(450,HookType_Entity,ReturnType_Void,ThisPointer_CBaseEntity,OnUseFirstAidKit);
    
DHookAddParam(hCFirstAidKit,HookParamType_Int);
    
DHookAddParam(hCFirstAidKit,HookParamType_CBaseEntity);
    
DHookAddParam(hCFirstAidKit,HookParamType_CBaseEntity);
    
DHookAddParam(hCFirstAidKit,HookParamType_Float); 
Hooking is done in OnEntityCreated

PHP Code:
public void OnEntityCreated(int entity, const char[] classname)
{
    if(
StrEqual(classname,"weapon_first_aid_kit",false))
    {
        
DHookEntity(hCFirstAidKit,true,entity);
    }

Function body

PHP Code:
public MRESReturn OnUseFirstAidKit(int pThisHandle hParams)
{  
    
/*
        actiontype: 0 self heal -> 1 heal other  survivor
    */
    
    
int actiontype DHookGetParam(hParams,1);
    
int client DHookGetParam(hParams,2);
    
int target DHookGetParam(hParams,3);
    
//float time = DHookGetParam(hParams,4); this crashes the server
    
PrintToChatAll("CFirstAidKit::OnStartAction -> %d | %N | %N",actiontype,client,target);
    return 
MRES_Ignored;


Last edited by xerox8521; 04-17-2016 at 09:22.
xerox8521 is offline
Dragicula
New Member
Join Date: Sep 2015
Old 04-18-2016 , 18:46   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #448

I'm in need of some help.

[SM] Loaded extension dhooks.ext.dll successfully.

sm_rcon sm plugins load voiceannounce_ex
[SM] Plugin voiceannounce_ex.smx failed to load: Required extension "dhooks" file("dhooks.ext") not running.

Whenever, I load dhooks in console, it says that I loaded it successfully, but when I tried to load voiceannounce it says it isn't loading. I even have the extension autoloaded, file name is "dhooks.autoload"
Dragicula is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 04-19-2016 , 09:35   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #449

Quote:
Originally Posted by Dragicula View Post
I'm in need of some help.

[SM] Loaded extension dhooks.ext.dll successfully.

sm_rcon sm plugins load voiceannounce_ex
[SM] Plugin voiceannounce_ex.smx failed to load: Required extension "dhooks" file("dhooks.ext") not running.

Whenever, I load dhooks in console, it says that I loaded it successfully, but when I tried to load voiceannounce it says it isn't loading. I even have the extension autoloaded, file name is "dhooks.autoload"
sm exts list

Last edited by Dr!fter; 04-19-2016 at 10:13.
Dr!fter is offline
kralkop
Junior Member
Join Date: May 2016
Old 05-14-2016 , 05:00   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #450

How to install this to my cs go server?
kralkop 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 12:59.


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