AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Extensions (https://forums.alliedmods.net/forumdisplay.php?f=134)
-   -   DHooks (Dynamic Hooks - Dev Preview) (https://forums.alliedmods.net/showthread.php?t=180114)

GPhoenix97 01-24-2013 15:48

Re: DHooks (Dynamic Hooks - Dev Preview)
 
hi!
Code:

L 01/24/2013 - 21:44:06: [SM] Unable to load extension "dhooks.ext": Could not find interface: VSERVERTOOLS002
L 01/24/2013 - 21:44:06: [SM] Unable to load plugin "admin-allspec.smx": Required extension "dhooks" file("dhooks.ext") not running

it's CS:S
SM newest
MM newest

Dr!fter 01-24-2013 16:01

Re: DHooks (Dynamic Hooks - Dev Preview)
 
Quote:

Originally Posted by GPhoenix97 (Post 1879715)
hi!
Code:

L 01/24/2013 - 21:44:06: [SM] Unable to load extension "dhooks.ext": Could not find interface: VSERVERTOOLS002
L 01/24/2013 - 21:44:06: [SM] Unable to load plugin "admin-allspec.smx": Required extension "dhooks" file("dhooks.ext") not running

it's CS:S
SM newest
MM newest

paste the output of the version command along with sm version and meta version please

GPhoenix97 01-24-2013 16:10

Re: DHooks (Dynamic Hooks - Dev Preview)
 
Quote:

Originally Posted by Dr!fter (Post 1879730)
paste the output of the version command along with sm version and meta version please

SourceMod Version Information:
SourceMod Version: 1.4.7-dev
SourcePawn Engine: SourcePawn 1.1, jit-x86 (build 1.4.7-dev)
SourcePawn API: v1 = 4, v2 = 4
Compiled on: Jan 6 2013 07:19:08
Build ID: 3605:fe35b5032f37-dev
http://www.sourcemod.net/

Metamod:Source version 1.9.2-dev
Build ID: 807:6fcbd5454095-dev
Loaded As: Valve Server Plugin
Compiled on: Dec 23 2012
Plugin interface version: 15:14
SourceHook version: 5:5
http://www.metamodsource.net/

Dr!fter 01-24-2013 16:24

Re: DHooks (Dynamic Hooks - Dev Preview)
 
Quote:

Originally Posted by Dr!fter (Post 1666379)
  • 1.0.11-alpha
    • Made engine specific builds so that it works with tf2 again.
    • Hopefully fixed crashes in CS:GO in OnEntityCreated
    • Fixed a bug using Edict params.
    • Requires SM 1.5 and MM:S 1.9+

Quote:

Originally Posted by GPhoenix97 (Post 1879736)
SourceMod Version Information:
SourceMod Version: 1.4.7-dev
SourcePawn Engine: SourcePawn 1.1, jit-x86 (build 1.4.7-dev)
SourcePawn API: v1 = 4, v2 = 4
Compiled on: Jan 6 2013 07:19:08
Build ID: 3605:fe35b5032f37-dev
http://www.sourcemod.net/

Metamod:Source version 1.9.2-dev
Build ID: 807:6fcbd5454095-dev
Loaded As: Valve Server Plugin
Compiled on: Dec 23 2012
Plugin interface version: 15:14
SourceHook version: 5:5
http://www.metamodsource.net/


GPhoenix97 01-24-2013 16:33

Re: DHooks (Dynamic Hooks - Dev Preview)
 
sorry, i didnt notice that. sorry again for a trouble and thanks :D

Electr000999 01-25-2013 03:35

Re: DHooks (Dynamic Hooks - Dev Preview)
 
1 Attachment(s)
Up, add i use for test last sm 1.5.0-hg3756, and metamod 1.9.1 stable branch, dhooks 1.0.11-alpha on l4d2 windows server.
On DHookEntity(g_hOnSetTransmit, false, client, RemovalCB) - crash occurs:(
Offset is from the current sdkhooks, attached a crash dump, Please help)

Quote:

Originally Posted by Electr000999 (Post 1865522)
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 <dhooks>

static        Handle:g_hOnSetTransmit, // OnSetTransmit
                OnSetTransmitHookID[MAXPLAYERS+1];

public Plugin:myinfo =
{
        name = "SetTransmit Example on dhooks",
        author                  = "Electr0",
        description = "",
        version                = "0.2",
        url                        = "http://steamcommunity.com/id/Electr0n/"
};

public OnPluginStart()
{
        new Handle:temp = LoadGameConfigFile("sdkhooks.games/game.l4d2");
        if( temp != INVALID_HANDLE )
        {               
                new offset = GameConfGetOffset(temp, "SetTransmit");
                if(offset == -1)
                {
                        SetFailState("Unable to find offset for SetTransmit");
                }                       
                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/sdkhooks.games/game.l4d2");

        RegConsoleCmd("sm_setTransmit_me", sm_setTransmit_me);       
}

public Action:sm_setTransmit_me(client,args)
{
        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]);
        }
}

public MRESReturn:Hook_SetTransmit(entity, Handle:hReturn, Handle:hParams)
{
        new client = DHookGetParam(hParams, 1);
        if( entity == client)
        {
                return MRES_Handled;
        }
        return MRES_Ignored;
}

public RemovalCB(hookid)
{       
        PrintToServer("Removed hook %i", hookid);
}



Dr!fter 01-25-2013 13:02

Re: DHooks (Dynamic Hooks - Dev Preview)
 
Quote:

Originally Posted by Electr000999 (Post 1880096)
Up, add i use for test last sm 1.5.0-hg3756, and metamod 1.9.1 stable branch, dhooks 1.0.11-alpha on l4d2 windows server.
On DHookEntity(g_hOnSetTransmit, false, client, RemovalCB) - crash occurs:(
Offset is from the current sdkhooks, attached a crash dump, Please help)

Your missing a param for one and the first param isnt an ent.

https://bitbucket.org/psychonic/sdkh...efault#cl-1253

daleGEND 02-05-2013 21:54

Re: DHooks (Dynamic Hooks - Dev Preview)
 
Curious if this needs to be updated at all too since the latest CS:S update? I have 1 plugin that uses this extension but it fails to run saying dhooks is not loading.

Crone 02-06-2013 04:19

Re: DHooks (Dynamic Hooks - Dev Preview)
 
same for me dhooks donīt work at the moment ;)

Bittersweet 02-07-2013 13:32

Re: DHooks (Dynamic Hooks - Dev Preview)
 
I am using the admin-allspec plugin on a Windows CS:S server. It's causing a crash, see https://forums.alliedmods.net/showpo...2&postcount=33.

I just updated to the latest DHooks posted in this thread. Using the plugin causes the server to crash a few seconds after a human starts playing - you never make it through one round. When I disable the plugin, DHooks doesn't load since the admin-allspec is the only plugin using it. I manually loaded the DHooks extension and played a few rounds to try duplicating the crash, and it never did crash. I see the MM requirement of 1.9+. I'm wondering if MM 1.10 meets that requirement?


All times are GMT -4. The time now is 19:06.

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