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

SDK Hooks 2.1 - Updated 2011-9-10


Post New Thread Closed Thread   
 
Thread Tools Display Modes
asto
Member
Join Date: Aug 2010
Old 07-03-2012 , 16:31   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1951

PHP Code:
#include <sourcemod>
#include <sdkhooks>
#include <sdktools>

public OnPluginStart()
{
    
HookEvent("weapon_reload"Weapon_Reload);
}

public 
Action:Weapon_Reload(Handle:event, const String:event_name[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event,"userid"));
    
SDKHook(clientSDKHook_PreThinkOnPreThink);
}

public 
OnPreThink(client)
{

SDKHooks 2.2.0 crashes if this plugin is running (tested in L4D1). If I reload, the game will crash. The problem is with PreThink, PostThinkPost, ... (the "Think" functions). The problem is when the hook is in an event.
asto is offline
wanted2411
Senior Member
Join Date: Jun 2012
Old 07-04-2012 , 07:22   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1952

The plugins is incorrect worked. Very often interfere with OnPreThink - he sometimes does not work.
wanted2411 is offline
wanted2411
Senior Member
Join Date: Jun 2012
Old 07-04-2012 , 09:16   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1953

When i update sm to 1.4.4 release:

L 07/04/2012 - 17:12:43: [SM] Error parsing gameconfig file "/usr/local/games/css/s9427054/css/cstrike/addons/sourcemod/gamedata/sdkhooks.games/engine.ep2v.txt":
L 07/04/2012 - 17:12:43: [SM] Error 9 on line 1, col 14: Line contained too many invalid tokens
L 07/04/2012 - 17:12:43: [SM] Unable to load extension "sdkhooks.ext": Could not read sdkhooks.games gamedata: Line contained too many invalid tokens
wanted2411 is offline
wanted2411
Senior Member
Join Date: Jun 2012
Old 07-04-2012 , 09:19   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1954

Oops, i know what is the problem. Sorry for flood.
wanted2411 is offline
thacursedpie
Member
Join Date: May 2008
Old 07-04-2012 , 17:14   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1955

I'm developing a plugin for TF2. I'm trying to hook
Code:
SDKHook_GroundEntChangedPost
, but an error shows up in the console: "Native 'SDKHook' reported: Hook type not reported on this game."

Is this hook simply not supported and am I out of luck, or should I update some file? I just downloaded SDK Hooks v2.1 today. I'm running a listen TF2 server with Sourcemod 1.4.4 on my Windows (7, x64) laptop.

I already tried searching for an answer to this issue, but nothing relevant came up. Tell me if you need more info!
thacursedpie is offline
TheAvengers2
BANNED
Join Date: Jul 2011
Old 07-04-2012 , 18:32   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1956

A quick look over the source reveals that this happens when the offset can't be found. I don't see any problems with the offset in the gamedata for tf2. I'd suggest trying to update to the latest snapshot of sdkhooks 2.2.0b4.

@psychonic:
AHHHhhh. The repo broke!!

Last edited by TheAvengers2; 07-04-2012 at 18:32.
TheAvengers2 is offline
thacursedpie
Member
Join Date: May 2008
Old 07-04-2012 , 19:10   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1957

Thanks for your reply, I'll try the new version.

In the mean time here's what I found in the gamedata file (engine.ep2v.txt):
Code:
"#supported"
        {
            "game"        "cstrike"
            "game"        "dod"
            "game"        "tf"
            "game"        "hl2mp"
        }

<snip snip>

"GroundEntChanged"
            {
                "windows"    "174"
                "linux"        "175"
                "mac"        "175"
            }
(first part starts on line 5, second on line 27).

So, yeah, I don't understand why it's unhappy.
thacursedpie is offline
TheAvengers2
BANNED
Join Date: Jul 2011
Old 07-04-2012 , 19:47   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1958

Your gamedata file looks outdated. This is apparent because of how you posted #supported. In the latest updates, the game tf was moved into its own separate section in the gamedata. Additionally, the offsets for GroundEntChanged appear to be wrong/outdated in your post. I don't know whether either of these issues are causing your problems, though.

Last edited by TheAvengers2; 07-04-2012 at 23:29.
TheAvengers2 is offline
thacursedpie
Member
Join Date: May 2008
Old 07-05-2012 , 14:17   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1959

I just downloaded SDK Hooks 2.2.0 dev HG193 and installed it. Instead of an error message, the game now crashes on
Code:
SDKHook(client, SDKHook_GroundEntChangedPost, OnGroundEntChanged);


Link to my full plugin code: http://pastebin.com/rqaEBS3p
(relevant lines are marked with "Causes crash!")
thacursedpie is offline
bovril
Member
Join Date: Jan 2011
Old 07-07-2012 , 04:49   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1960

I've still having trouble with SDKHooks causing crashes since the pyro update.

I've pulled the latest stable sourcemod and the latest sdkhooks (193) but to no avail.....I've read through the thread so far but I'm still not clear on a fix.

If there's a procedure could somebody take pity on me and a b c cos I'd really like to get it working again, the server is running linux.
bovril is offline
Closed Thread



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 03:22.


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