Raised This Month: $ Target: $400
 0% 

SDK Hooks 2.1 - Updated 2011-9-10


Post New Thread Closed Thread   
 
Thread Tools Display Modes
psychonic

BAFFLED
Join Date: May 2008
Old 12-19-2011 , 08:46   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1741

Quote:
Originally Posted by Mecha the Slag View Post
Has this been fixed yet?
I saw no reason why just that one would have issues unless it was a gamedata issue. Gamedata has been updated a few times since then, so if it somehow was off for that one at the time, it shouldn't be now.

There's nothing special with the WeaponSwitch hook.
psychonic is offline
PlayBoy31
Senior Member
Join Date: May 2011
Location: into the void
Old 12-19-2011 , 15:15   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1742

with last build (15 i cant boot my l4d1 and l4d2 (linux) servers :/

is it normal? a fix is pending?
PlayBoy31 is offline
psychonic

BAFFLED
Join Date: May 2008
Old 12-19-2011 , 15:22   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1743

Quote:
Originally Posted by PlayBoy31 View Post
with last build (15 i cant boot my l4d1 and l4d2 (linux) servers :/

is it normal? a fix is pending?
Quote:
Originally Posted by psychonic View Post
Oh, right. That's because I forgot to add that to gamedata for probably all but ep2v when adding logical ent support.

Add this to the Offsets section in gamedata/sdkhooks.games/engine.l4d.txt
Code:
			"EntityListeners"
			{
				"windows"	"65572"
				"linux"		"65572"
				"mac"		"65572"
			}
That said, anything not on the first post is considered to be either old or a test/beta version and not guaranteed to work.

Last edited by psychonic; 12-19-2011 at 15:23.
psychonic is offline
PlayBoy31
Senior Member
Join Date: May 2011
Location: into the void
Old 12-19-2011 , 15:35   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1744

Sorry, forgot to read before ...

it works now thanks
PlayBoy31 is offline
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 12-19-2011 , 17:19   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1745

Is it possible to unhook something in another plugin if you got the function reference to the callback (and client/entity index of course)?

Example (http://forums.alliedmods.net/showthread.php?t=173719):

The Zombie:Reloaded plugin hook WeaponCanUse and prevents zombies from picking up weapons. A third party addon plugin want to allow zombies to use grenades by unhooking WeaponCanUse in ZR and set up its own WeaponCanUse hook. Then the third party plugin can allow zombies to pickup grenades. For other weapons, the callback in the ZR plugin is dynamically called instead so ZR will function properly.

Since the callback in ZR is public, it's possible to get a reference to it. But unhooking it doesn't seem to work. Is SDK Hooks preventing this from happening - or is it even possible at all?
__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)

Last edited by rhelgeby; 12-19-2011 at 17:22.
rhelgeby is offline
Send a message via MSN to rhelgeby
psychonic

BAFFLED
Join Date: May 2008
Old 12-19-2011 , 20:09   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1746

Quote:
Originally Posted by rhelgeby View Post
Is it possible to unhook something in another plugin if you got the function reference to the callback (and client/entity index of course)?

Since the callback in ZR is public, it's possible to get a reference to it. But unhooking it doesn't seem to work. Is SDK Hooks preventing this from happening - or is it even possible at all?
Yes. That is intentionally done for safety. You can only unhook your own hooks.

Quote:
Originally Posted by rhelgeby View Post
Example (http://forums.alliedmods.net/showthread.php?t=173719):

The Zombie:Reloaded plugin hook WeaponCanUse and prevents zombies from picking up weapons. A third party addon plugin want to allow zombies to use grenades by unhooking WeaponCanUse in ZR and set up its own WeaponCanUse hook. Then the third party plugin can allow zombies to pickup grenades. For other weapons, the callback in the ZR plugin is dynamically called instead so ZR will function properly.
There are a few other ways to handle that. The most obvious seems to be just providing a forward from ZR that gets called in the CanUse callback. Other plugins can listen and override if necessary.
psychonic is offline
rhelgeby
Veteran Member
Join Date: Oct 2008
Location: 0x4E6F72776179
Old 12-19-2011 , 20:34   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1747

I suppose it's good that it's blocked then. Otherwise it would be difficult to give support when people complain about weird bugs not really caused by the original plugin.

Creating a forward sounds like the solution.
__________________
Richard Helgeby

Zombie:Reloaded | PawnUnit | Object Library
(Please don't send private messages for support, they will be ignored. Use the forum.)
rhelgeby is offline
Send a message via MSN to rhelgeby
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 12-20-2011 , 23:23   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1748

So now I have to keep reinstalling SDKHooks due to this error:

Quote:
L 12/21/2011 - 04:166: SourceMod error session started
L 12/21/2011 - 04:166: Info (map "c1m1_hotel") (file "errors_20111221.log")
L 12/21/2011 - 04:166: [SM] Error parsing gameconfig file "d:\srcds\left4dead2\left4dead2\addons\source mod\gamedata\sdkhooks.games\common.games.txt" :
L 12/21/2011 - 04:166: [SM] Error 1 on line 0, col 0: Stream failed to open
L 12/21/2011 - 04:166: [SM] Unable to load extension "sdkhooks.ext": Could not read sdkhooks.games.txt: File could not be opened: The system cannot find the file specified.

Edit: SDKhooks 2.1 from first post. L4D2.
__________________

Last edited by Silvers; 12-20-2011 at 23:25.
Silvers is offline
Machine
Senior Member
Join Date: Apr 2010
Old 12-20-2011 , 23:35   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1749

I had the same problem. You have to download it from the live source repository on the first page.

Seems it updates gamedata files, but forgets to download renamed files.
Machine is offline
Ketamine
Junior Member
Join Date: May 2011
Old 12-20-2011 , 23:36   Re: SDK Hooks 2.1 - Updated 2011-9-10
#1750

Quote:
Originally Posted by Silvers View Post
So now I have to keep reinstalling SDKHooks due to this error:




Edit: SDKhooks 2.1 from first post. L4D2.
make sure you even have the file in there to begin with. i was getting that error but was missing the file there for some reason. it updated mine to this and it's working, so maybe try it:

common.games.txt
Code:
"Games"
{
	"#default"
	{
		"Offsets"
		{
			"EntityListeners"
			{
				"windows"	"65572"
				"linux"		"65572"
				"mac"		"65572"
			}
		}
	}
}

Last edited by Ketamine; 12-20-2011 at 23:37.
Ketamine 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 19:40.


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