Raised This Month: $32 Target: $400
 8% 

DHooks (Dynamic Hooks - Dev Preview)


Post New Thread Reply   
 
Thread Tools Display Modes
Ejziponken
AlliedModders Donor
Join Date: Apr 2008
Old 12-30-2012 , 19:43   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #81

I have SM 1.5, CSP 1.10

[SM] Unable to load plugin "admin-allspec.smx": Required extension "dhooks" file("dhooks.ext") not running


01:44:08 [SM] Displaying 9 extensions:
[01] Automatic Updater (1.5.0-dev+373: Updates SourceMod gamedata files
[02] Webternet (1.5.0-dev+373: Extension for interacting with URLs
[03] SDK Tools (1.5.0-dev+373: Source SDK Tools
[04] BinTools (1.5.0-dev+373: Low-level C/C++ Calling API
[05] Top Menus (1.5.0-dev+373: Creates sorted nested menus
[06] <FAILED> file "dhooks.ext.so": libvstdlib.so: cannot open shared object file: No such file or directory
[07] Client Preferences (1.5.0-dev+373: Saves client preference settings
[08] SQLite (1.5.0-dev+373: SQLite Driver
[09] MySQL-DBI (1.5.0-dev+373: MySQL driver implementation for DBI

Last edited by Ejziponken; 12-30-2012 at 19:44.
Ejziponken is offline
psychonic

BAFFLED
Join Date: May 2008
Old 12-30-2012 , 20:08   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #82

Quote:
Originally Posted by Ejziponken View Post
I have SM 1.5, CSP 1.10

[SM] Unable to load plugin "admin-allspec.smx": Required extension "dhooks" file("dhooks.ext") not running


01:44:08 [SM] Displaying 9 extensions:
[01] Automatic Updater (1.5.0-dev+373: Updates SourceMod gamedata files
[02] Webternet (1.5.0-dev+373: Extension for interacting with URLs
[03] SDK Tools (1.5.0-dev+373: Source SDK Tools
[04] BinTools (1.5.0-dev+373: Low-level C/C++ Calling API
[05] Top Menus (1.5.0-dev+373: Creates sorted nested menus
[06] <FAILED> file "dhooks.ext.so": libvstdlib.so: cannot open shared object file: No such file or directory
[07] Client Preferences (1.5.0-dev+373: Saves client preference settings
[08] SQLite (1.5.0-dev+373: SQLite Driver
[09] MySQL-DBI (1.5.0-dev+373: MySQL driver implementation for DBI
Per the first post, it doesn't support engines that old.
psychonic is offline
Ejziponken
AlliedModders Donor
Join Date: Apr 2008
Old 12-31-2012 , 08:46   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #83

Quote:
Originally Posted by psychonic View Post
Per the first post, it doesn't support engines that old.
CSP old? Isnt it the same engine as CSGO/Source?
Ejziponken is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 12-31-2012 , 09:26   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #84

No, it's Source 2007.

Also, CS:S and CSGO aren't the same engine either.
__________________

Last edited by asherkin; 12-31-2012 at 09:27.
asherkin is offline
Electr000999
Senior Member
Join Date: Aug 2011
Old 01-02-2013 , 14:27   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #85

Hi Dr!fter, thx for extension, can you help SetTransmit hook example for l4d2 based on your extension?

server crash when I start the hook..(

Here source my brocken example

Code:
#pragma	semicolon 1
#include <sourcemod>
#include <sdktools>
#include <sdktools_functions>

#define dhooks_edition 						1
#if dhooks_edition	
#include <dhooks>
#else	
#include <sdkhooks>	
#endif

#if dhooks_edition	
static	Handle:g_hOnSetTransmit, // OnSetTransmit
		OnSetTransmitHookID[MAXPLAYERS+1];
#else	
static	bool:Hooked[MAXPLAYERS+1];
#endif

public Plugin:myinfo = 
{
	#if dhooks_edition	
	name = "SetTransmit Example on dhooks",
	#else	
	name = "SetTransmit Example on sdkhooks",
	#endif	
	
	author	  	= "Electr0",
	description = "",
	version	 	= "0.1",
	url		 	= "http://steamcommunity.com/id/Electr0n/"
};

public OnPluginStart()
{
	#if dhooks_edition	
	new Handle:temp = LoadGameConfigFile("l4d2_dhooks_plugins");
	if( temp != INVALID_HANDLE )
	{		
		g_hOnSetTransmit = DHookCreate(GameConfGetOffset(temp, "SetTransmit"), HookType_Entity, ReturnType_Int, ThisPointer_CBaseEntity, Hook_SetTransmit);	
		DHookAddParam(g_hOnSetTransmit, HookParamType_CBaseEntity);
			
		CloseHandle(temp);
	}
	else
		SetFailState("Missing required gamedata/l4d2_dhooks_plugins.txt");
	#endif	

	RegConsoleCmd("sm_setTransmit_me", sm_setTransmit_me);	
}

	

public Action:sm_setTransmit_me(client,args)
{ 
	#if dhooks_edition	
	if (OnSetTransmitHookID[client] != 0)
	{	
		PrintToServer("Remove old OnSetTransmit hook::DHookRemoveHookID(%i)", OnSetTransmitHookID[client]);
		DHookRemoveHookID(OnSetTransmitHookID[client]);
		OnSetTransmitHookID[client]=0;
	}
	else
	{
		OnSetTransmitHookID[client] = DHookEntity(g_hOnSetTransmit, false, client, RemovalCB);
		PrintToServer("Create OnSetTransmit hook %i", OnSetTransmitHookID[client]);
	}
	#else	
	if (Hooked[client] != false)
	{
		PrintToServer("Remove old OnSetTransmit hook");
		Hooked[client]=false;
		SDKUnhook( client, SDKHook_SetTransmit, Hook_SetTransmit);
	}
	else
	{
		PrintToServer("Create OnSetTransmit hook");
		Hooked[client]=true;
		SDKHook( client, SDKHook_SetTransmit, Hook_SetTransmit);
	}
	#endif 	
}

#if dhooks_edition	
public MRESReturn:Hook_SetTransmit(entity, Handle:hReturn, Handle:hParams)
#else	
public Action:Hook_SetTransmit(entity, client)
#endif
{
	#if dhooks_edition	
	new client = DHookGetParam(hParams, 1);
	#endif
	if( entity == client)
	{
		#if dhooks_edition	
		return MRES_Handled;
		#else	
		return Plugin_Handled;
		#endif	
	
	}
	#if dhooks_edition	
	return MRES_Ignored;
	#else	
	return Plugin_Continue;
	#endif	
}

public RemovalCB(hookid) 
{ 	
	PrintToServer("Removed hook %i", hookid);
}
l4d2_dhooks_plugins.txt :
Code:
"Games"
{
	"left4dead2"
	{
		"Offsets"
		{
			"SetTransmit"
			{
				"windows"	"21"
				"linux"		"22"
			}
		}
	}
}

Last edited by Electr000999; 01-03-2013 at 02:44.
Electr000999 is offline
Send a message via Skype™ to Electr000999
dertione
Junior Member
Join Date: Sep 2011
Old 01-10-2013 , 16:07   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #86

Hello, can you give your extension with this version : 1.0.5-alpha . Because this plugin : http://forums.alliedmods.net/showthread.php?t=182412, work only with this version and not 1.0.11.
Thanks for your attention.
dertione is offline
minimoney1
SourceMod Donor
Join Date: Dec 2010
Old 01-10-2013 , 21:48   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #87

Quote:
Originally Posted by dertione View Post
Hello, can you give your extension with this version : 1.0.5-alpha . Because this plugin : http://forums.alliedmods.net/showthread.php?t=182412, work only with this version and not 1.0.11.
Thanks for your attention.
The linked plugin works with the newest version as well.
Look closely, it says:
Quote:
Requires DHooks 1.0.5-alpha+
__________________
Need help? PM me or add me on Steam.
My Steam




Quote:
Originally Posted by Rp.KryptoNite View Post
For some reason his Plugin never worked for me ,
@credits were added
im not stealing any plugins dude its my THING
minimoney1 is offline
dertione
Junior Member
Join Date: Sep 2011
Old 01-12-2013 , 15:19   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #88

Since I have make the update of dhook :
L 01/09/2013 - 13:05:14: [SM] Unable to load plugin "admin-allspec.smx": Required extension "dhooks"
dertione is offline
Dr!fter
The Salt Boss
Join Date: Mar 2007
Old 01-13-2013 , 10:28   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #89

Quote:
Originally Posted by dertione View Post
Since I have make the update of dhook :
L 01/09/2013 - 13:05:14: [SM] Unable to load plugin "admin-allspec.smx": Required extension "dhooks"
you cut half the error but i assume it says is not loaded. In server console type sm exts list and post the output and check your error log.
Dr!fter is offline
ProdigySim
SourceMod Plugin Approver
Join Date: Feb 2010
Old 01-22-2013 , 13:26   Re: DHooks (Dynamic Hooks - Dev Preview)
Reply With Quote #90

Great stuff. It's really nice to be able to have hooks I can turn on and off simply by adding and removing a little plugin
ProdigySim 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 18:55.


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