Raised This Month: $ Target: $400
 0% 

DHooks (Dynamic Hooks - Dev Preview)


Post New Thread Reply   
 
Thread Tools Display Modes
x6herbius
Senior Member
Join Date: May 2011
Location: West Sussex, UK
Old 01-19-2015 , 06:24   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #251

Oh, that's good news. I'll compile with 1.7 and do away with DHooks in that case, OnTakeDamage_Alive was the only thing I needed it for.
x6herbius is offline
Send a message via Skype™ to x6herbius
sazonische
Senior Member
Join Date: Dec 2013
Old 02-12-2015 , 18:54   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #252

PHP Code:
Code size:            13256 bytes
Data size
:             4508 bytes
Stack
/heap size:      16384 bytes
Total requirements
:   34148 bytes
-e Compiling admin-allspec.sp ...
SourcePawn Compiler 1.7.0
Copyright 
(c1997-2006 ITB CompuPhase
Copyright 
(c2004-2014 AlliedModders LLC

/home/sazonische/Dropbox/new_amx/csgo1/include/dhooks.inc(99) : error 010invalid function or declaration
/home/sazonische/Dropbox/new_amx/csgo1/include/dhooks.inc(105) : error 010invalid function or declaration
/home/sazonische/Dropbox/new_amx/csgo1/include/dhooks.inc(111) : error 010invalid function or declaration
/home/sazonische/Dropbox/new_amx/csgo1/include/dhooks.inc(117) : error 010invalid function or declaration
/home/sazonische/Dropbox/new_amx/csgo1/include/dhooks.inc(122) : error 010invalid function or declaration
/home/sazonische/Dropbox/new_amx/csgo1/include/dhooks.inc(125) : error 010invalid function or declaration
/home/sazonische/Dropbox/new_amx/csgo1/include/dhooks.inc(128) : error 010invalid function or declaration
/home/sazonische/Dropbox/new_amx/csgo1/include/dhooks.inc(131) : error 010invalid function or declaration
/home/sazonische/Dropbox/new_amx/csgo1/include/dhooks.inc(187) : warning 237coercing functions to and from primitives is unsupported and will be removed in the future
/home/sazonische/Dropbox/new_amx/csgo1/include/dhooks.inc(198) : warning 237coercing functions to and from primitives is unsupported and will be removed in the future
/home/sazonische/Dropbox/new_amx/csgo1/include/dhooks.inc(210) : warning 237coercing functions to and from primitives is unsupported and will be removed in the future
admin
-allspec.sp(44) : error 100: function prototypes do not match
admin
-allspec.sp(65) : error 122expected type expression
admin
-allspec.sp(72) : error 166cannot use 'this' outside of a methodmap method or property
admin
-allspec.sp(72) : error 166cannot use 'this' outside of a methodmap method or property
admin
-allspec.sp(72) : error 166cannot use 'this' outside of a methodmap method or property
admin
-allspec.sp(72) : fatal error 187too many error messages on one line

Compilation aborted
.
14 Errors
dhooks-2.0.0-hg64-linux.tar.gz
help please

Last edited by sazonische; 02-12-2015 at 18:56.
sazonische is offline
Send a message via Skype™ to sazonische
x6herbius
Senior Member
Join Date: May 2011
Location: West Sussex, UK
Old 02-12-2015 , 20:00   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #253

If you're using SM 1.7, I think "this" as a keyword has become reserved, so just change them to something like "thisPointer" in that include.
x6herbius is offline
Send a message via Skype™ to x6herbius
dr_lex
Member
Join Date: Dec 2014
Old 02-21-2015 , 10:03   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #254

PHP Code:
H:\Server>"bin\sourcepawn\spcomp.exe" -O2 -Dsources voiceannounce_ex_old.sp
SourcePawn Compiler 1.7.1-dev+5154
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2014 AlliedModders LLC

H:\Server\bin\sourcepawn\include\dhooks.inc(187) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
H:\Server\bin\sourcepawn\include\dhooks.inc(198) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
H:\Server\bin\sourcepawn\include\dhooks.inc(210) : warning 237: coercing functions to and from primitives is unsupported and will be removed in the future
Code size:             6044 bytes
Data size:             3188 bytes
Stack/heap size:      16384 bytes
Total requirements:   25616 bytes

3 Warnings. 

Last edited by dr_lex; 02-21-2015 at 11:37.
dr_lex is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 03-21-2015 , 10:13   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #255

srcds.exe crashes when I type 'exit' or 'quit' command and this extension is loaded.

Versions : MM 1.11.0-dev
SM 1.8.0-dev+5349 Mar 12 2015 14:57:43

Did some research, doesn't crash with these : DHooks2 Builds : http://users.alliedmods.net/~drifter/builds/dhooks/2.0/ (Requires SM 1.7)

Furthermore, I had to completely change the INC file for what I wanted, to be able to compile on this SM version.

PHP Code:
#if defined _dhooks_included
    #endinput
#endif

#define _dhooks_included

enum ObjectValueType
{
    
ObjectValueType_Int 0,
    
ObjectValueType_Bool,
    
ObjectValueType_Ehandle,
    
ObjectValueType_Float,
    
ObjectValueType_CBaseEntityPtr,
    
ObjectValueType_IntPtr,
    
ObjectValueType_BoolPtr,
    
ObjectValueType_EhandlePtr,
    
ObjectValueType_FloatPtr,
    
ObjectValueType_Vector,
    
ObjectValueType_VectorPtr
};

enum ListenType
{
    
ListenType_Created 0,
    
ListenType_Deleted
};

enum ReturnType
{
    
ReturnType_Unknown 0,
    
ReturnType_Void,
    
ReturnType_Int,
    
ReturnType_Bool,
    
ReturnType_Float,
    
ReturnType_String,
    
ReturnType_StringPtr,
    
ReturnType_CharPtr,
    
ReturnType_Vector,
    
ReturnType_VectorPtr,
    
ReturnType_CBaseEntity,
    
ReturnType_Edict
};

enum HookParamType
{
    
HookParamType_Unknown 0,
    
HookParamType_Int,
    
HookParamType_Bool,
    
HookParamType_Float,
    
HookParamType_String,
    
HookParamType_StringPtr,
    
HookParamType_CharPtr,
    
HookParamType_VectorPtr,
    
HookParamType_CBaseEntity,
    
HookParamType_ObjectPtr,
    
HookParamType_Edict
};

enum ThisPointerType
{
    
ThisPointer_Ignore 0,
    
ThisPointer_CBaseEntity,
    
ThisPointer_Address
};

enum HookType
{
    
HookType_Entity 0,
    
HookType_GameRules,
    
HookType_Raw
};

enum MRESReturn
{
    
MRES_ChangedHandled = -2,
    
MRES_ChangedOverride,
    
MRES_Ignored,
    
MRES_Handled,
    
MRES_Override,
    
MRES_Supercede
};

typedef DHookCallback = function MRESReturn (any OwnerHandle Return, Handle Params);

native Handle:DHookCreate(OffsHookType:hookTypeReturnType:returnTypeThisPointerType:thisTypeDHookCallback:callBack);
native DHookAddParam(Handle:SetupHookParamType:Type);
native any:DHookGetParam(Handle:ParamsNum);
native DHookEntity(Handle:Setupbool:bPostEntityany:Something = -1);
native DHookSetReturn(Handle:Return, any:Value);
native bool:DHookIsNullParam(Handle:ParamsNum);

public 
Extension:__ext_dhooks = {
    
name "dhooks",
    
file "dhooks.ext",
    
autoload 1,
    
required 1,
};

#if !defined REQUIRE_EXTENSIONS
public __ext_dhooks_SetNTVOptional() {
    
MarkNativeAsOptional("DHookCreate");
    
MarkNativeAsOptional("DHookAddParam");
    
MarkNativeAsOptional("DHookGetParam");
    
MarkNativeAsOptional("DHookEntity");
    
MarkNativeAsOptional("DHookSetReturn");
    
MarkNativeAsOptional("DHookIsNullParam");
}
#endif 
__________________

Last edited by claudiuhks; 03-21-2015 at 10:33.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 03-21-2015 , 20:59   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #256

Quote:
Originally Posted by claudiuhks View Post
srcds.exe crashes when I type 'exit' or 'quit' command and this extension is loaded.

Versions : MM 1.11.0-dev
SM 1.8.0-dev+5349 Mar 12 2015 14:57:43

Did some research, doesn't crash with these : DHooks2 Builds : http://users.alliedmods.net/~drifter/builds/dhooks/2.0/ (Requires SM 1.7)

Furthermore, I had to completely change the INC file for what I wanted, to be able to compile on this SM version.

PHP Code:
#if defined _dhooks_included
    #endinput
#endif

#define _dhooks_included

enum ObjectValueType
{
    
ObjectValueType_Int 0,
    
ObjectValueType_Bool,
    
ObjectValueType_Ehandle,
    
ObjectValueType_Float,
    
ObjectValueType_CBaseEntityPtr,
    
ObjectValueType_IntPtr,
    
ObjectValueType_BoolPtr,
    
ObjectValueType_EhandlePtr,
    
ObjectValueType_FloatPtr,
    
ObjectValueType_Vector,
    
ObjectValueType_VectorPtr
};

enum ListenType
{
    
ListenType_Created 0,
    
ListenType_Deleted
};

enum ReturnType
{
    
ReturnType_Unknown 0,
    
ReturnType_Void,
    
ReturnType_Int,
    
ReturnType_Bool,
    
ReturnType_Float,
    
ReturnType_String,
    
ReturnType_StringPtr,
    
ReturnType_CharPtr,
    
ReturnType_Vector,
    
ReturnType_VectorPtr,
    
ReturnType_CBaseEntity,
    
ReturnType_Edict
};

enum HookParamType
{
    
HookParamType_Unknown 0,
    
HookParamType_Int,
    
HookParamType_Bool,
    
HookParamType_Float,
    
HookParamType_String,
    
HookParamType_StringPtr,
    
HookParamType_CharPtr,
    
HookParamType_VectorPtr,
    
HookParamType_CBaseEntity,
    
HookParamType_ObjectPtr,
    
HookParamType_Edict
};

enum ThisPointerType
{
    
ThisPointer_Ignore 0,
    
ThisPointer_CBaseEntity,
    
ThisPointer_Address
};

enum HookType
{
    
HookType_Entity 0,
    
HookType_GameRules,
    
HookType_Raw
};

enum MRESReturn
{
    
MRES_ChangedHandled = -2,
    
MRES_ChangedOverride,
    
MRES_Ignored,
    
MRES_Handled,
    
MRES_Override,
    
MRES_Supercede
};

typedef DHookCallback = function MRESReturn (any OwnerHandle Return, Handle Params);

native Handle:DHookCreate(OffsHookType:hookTypeReturnType:returnTypeThisPointerType:thisTypeDHookCallback:callBack);
native DHookAddParam(Handle:SetupHookParamType:Type);
native any:DHookGetParam(Handle:ParamsNum);
native DHookEntity(Handle:Setupbool:bPostEntityany:Something = -1);
native DHookSetReturn(Handle:Return, any:Value);
native bool:DHookIsNullParam(Handle:ParamsNum);

public 
Extension:__ext_dhooks = {
    
name "dhooks",
    
file "dhooks.ext",
    
autoload 1,
    
required 1,
};

#if !defined REQUIRE_EXTENSIONS
public __ext_dhooks_SetNTVOptional() {
    
MarkNativeAsOptional("DHookCreate");
    
MarkNativeAsOptional("DHookAddParam");
    
MarkNativeAsOptional("DHookGetParam");
    
MarkNativeAsOptional("DHookEntity");
    
MarkNativeAsOptional("DHookSetReturn");
    
MarkNativeAsOptional("DHookIsNullParam");
}
#endif 
Yes, DHooks2 has many improvements over the original including crash fixes.

I also doubt you had to change the include file that much if at all (it throws a warning on SM 1.7+).
Dr!fter is offline
Electr000999
Senior Member
Join Date: Aug 2011
Old 03-25-2015 , 07:16   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #257

Dr!fter, you can fix include issues?
Electr000999 is offline
Send a message via Skype™ to Electr000999
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 03-26-2015 , 17:32   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #258

Quote:
Originally Posted by Electr000999 View Post
Dr!fter, you can fix include issues?
Fixed. Along with other fixes in the include and switching to the 1.7 transitional syntax.
Dr!fter is offline
jadhomer
Junior Member
Join Date: Feb 2013
Old 03-29-2015 , 12:52   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #259

I am unable to download the latest dhooks because there is a Cloudflare error ;-;

jadhomer is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 03-29-2015 , 15:17   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #260

Quote:
Originally Posted by jadhomer View Post
I am unable to download the latest dhooks because there is a Cloudflare error ;-;\
It needs to be accessed over plain HTTP, HTTPS is not supported on that subdomain.
__________________
asherkin 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 22:58.


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