DHooks (Dynamic Hooks - Dev Preview)
1 Attachment(s)
DHooks is now included with SourceMod 1.11.6820. Previous versions are unsupported.
Please use SourceMod's issue tracker on GitHub for any new issues. :bee: Oh no, not ANOTHER hooks extension!!! This extension is not just ANOTHER hooks extension :P But rather allows sourcemod plugins to create their own hooks. Note that you cannot set or get a unknown param/return's value. As a basic note, if the return type is void there won’t be a return handle pushed to the callback. If there is no params no param handle will be pushed. If this pointer is set to ignore this won’t be pushed. Example/Test Plugin PHP Code:
Thats all there is to it! :P Since this is a dev preview crashes can happen. I mostly tested in CS: S Windows. If you experience a crash please post the function, game, OS, and code. Changelog:
When installing DHooks2 make sure to remove any previous bin's of DHooks(1) DHooks2 REQUIRES SourceMod 1.7+ hg93+ REQUIRES SourceMod 1.8+ Credits: dvander - Helping with asm and being a huge help overall. KyleS - Input and reviewing my shitty commits. psychonic - Quacking and helping with buildbot along with coding questions. asherkin - SourceHook info. Powerlord - Debugging and fixing crashes. Links: Source : https://bitbucket.org/Drifter321/dhooks2 Waterfall : https://builds.alliedmods.net/drifter/waterfall Builds : http://users.alliedmods.net/~drifter/builds/dhooks/ DHooks with detour support (credit to Peace-Maker) https://forums.alliedmods.net/showpo...&postcount=589 |
Re: DHooks (Dynamic Hooks - Dev Preview)
I can't belive it! This is so much awesome!! It will replace nearly all my "just-a-hook-extensions" thank you for releasing this :D (did I already said this IS awesome?)
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Nice work!
Is being used by this. |
Re: DHooks (Dynamic Hooks - Dev Preview)
ill use it with my hats plugin to hook setentitymodel, thank you, nice job
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Wow, that's more than useful. I'll definetly mess with this :) Thank you!
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Your example has already done something I've been looking to do for a while now, thanks a ton Drifter!
|
Re: DHooks (Dynamic Hooks - Dev Preview)
awsum, great job!! =)
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Updated the extension to add support for raw pointer address's. There is an example using CDirector for left4dead2 in the test plugin. Also fixed hooks randomly getting unhooked if they weren't entity hooks.
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Updated again. Full changelog is in the original post. I removed the "pre-alpha" tag and made it an alpha. Ive been getting more time to test different hooks and seems to be working good so that is the reason :P
|
Re: DHooks (Dynamic Hooks - Dev Preview)
<KyleS> Drifter, Are you aware of any leaks in DHooks? D:
* ViolentCrimes has quit (Read error: Connection reset by peer) <KyleS> Drifter, http://pastie.org/private/vxdnhepkmhi7wowytmydcg - If the client is kicked, if the plugin or ext is unloaded, the memory still isn't freed. I'm not sure where it's occuring. I could fire up Valgrind though if you can't reproduce it. <KyleS> Hit about 2.5gb in 12h lol D: |
Re: DHooks (Dynamic Hooks - Dev Preview)
Code:
[14] <FAILED> file "dhooks.ext.so": Could not find interface: IGameHelpers |
Re: DHooks (Dynamic Hooks - Dev Preview)
Quote:
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Latest stable release.
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Quote:
Quote:
Also anyone running anything before 1.0.3-alpha should update to it, since the memory leak was pretty big. |
Re: DHooks (Dynamic Hooks - Dev Preview)
how can i hook css SwitchTeam signature and stop it?
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Quote:
|
Re: DHooks (Dynamic Hooks - Dev Preview)
i want to handle players switch and stop that for certain players
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Well, you can hook manual team changes with join_team, which stops most of the issues in general. If you want to take into consideration plugin swapping or admin interference, it's relatively easy to hook player_team, set the broadcast to false, and swap them back.
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Quote:
Quote:
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Quote:
|
Re: DHooks (Dynamic Hooks - Dev Preview)
jointeam* rather than join_team. Why can't you edit the mod and add an immunity feature?
|
Re: DHooks (Dynamic Hooks - Dev Preview)
i can but it's very stupid do it every time the mod updates
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Quote:
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Quote:
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Quote:
PHP Code:
PHP Code:
|
Re: DHooks (Dynamic Hooks - Dev Preview)
I need separate plugin :/
|
Re: DHooks (Dynamic Hooks - Dev Preview)
This really doesn't belong in this thread. Please post in the propriate plugin thread!
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Updated I added support for Object Pointer params like CTakeDamageInfo in OnTakeDamage. I will write a snippet with stocks to get and set different params for CTakeDamageInfo. Also made it optional to add a removal callback.
Here is a list of the offsets for CTakeDamageInfo as far as I can tell they are correct I did however not test all.
Spoiler
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Updated to 1.0.5-alpha Fixed a crash when a plugin was unloaded and a hook was active with no removal callback.
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Typo in description ?
Code:
/* Removes an entity listener hook |
Re: DHooks (Dynamic Hooks - Dev Preview)
EDIT: Thanks to asherkin for pointing out it was add not remove heh. Yea that is wrong ill fix it when i get home.
Since im posting here, Im working on a tutorial for DHooks to give a better explanation how it works. I hope to have it done soon. |
Re: DHooks (Dynamic Hooks - Dev Preview)
Do this work HL2MP ?
DHooks extension will load HL2MP mod, but I don't get any hook outputs work... :? Cs:s and Dod:s I can get work (Like Duck, Jump, observer, flashlight). I'm almost sure offset's are right what I have taken. |
Re: DHooks (Dynamic Hooks - Dev Preview)
Quote:
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Quote:
|
Re: DHooks (Dynamic Hooks - Dev Preview)
god gam... throw my computer out of window soon...
*edit Maybe something to do mine gamedata file. Plugin seems to be not getting offsets value from file like cs:s and dod:s.. wierd. Found it :D Gamedata have made entry hl2dm instead hl2mp |
Re: DHooks (Dynamic Hooks - Dev Preview)
Updated, fixed a crash on newer engines when trying to hook an entity.
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Thanks for the help. Great extension!
|
Re: DHooks (Dynamic Hooks - Dev Preview)
@Dr!fter
Does Dhooks can hook with cssbot functions like "CCSBot::IsFriendInTheWay(Vector const *)" I want to hook this funcion to reduce bot stuck. Is this possible? |
Re: DHooks (Dynamic Hooks - Dev Preview)
Update released! Check the first post for the changelog :D
|
Re: DHooks (Dynamic Hooks - Dev Preview)
Only virtual functions are supported, right?
|
All times are GMT -4. The time now is 23:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.