[EXTENSION] Hooker
Current Version 1.1.0 well i got tired of not having virtual hooks in sourcepawn so i made this extension, i know there is a similar extension called "Hacks" but the author has left SourceMod and it's pretty much broken...so what does this extension exactly do? it catchs whenever clients connect/disconnect and it adds sourcehooks on them so all of the game clients are already prehooked for developers and it also you give the ability to hook other game entities other than clients... Current Supported Games:
Natives and such.. Code:
Current available hook types... Code:
and these are the entity types that you should use with HookEntity and UnHookPlayer Code:
IMPORTANT: all of the hooks work except HK_EventKilled/HK_OnTakeDamage/HK_TraceAttack in tf2, due to sdk issues with CTakeDamageInfo... If you are wondering why i only have UnHookPlayer and not UnHookEntity is because i couldn't get any the IEntityFactoryDictionary::Destory working or maybe it wasn't just used by the game...so i figured out a way to unhook entites without having to worry about it in a plugin..in other words every time a plugin uses 'HookEntity' if the entity is not a player a manual hook called UpdateOnRemove will be hookoked to the entity and the moment this function gets called it will remove all of the hooks from the entity..a little hacky but thanks to lduke ;] another reminder is that not every hook type works in every game some functions are not there for every game and some functions seem to have a different return type in just one game than the others(just one lol)...so please check 'hooker.games.txt' to make sure the function is listed for the game you are using... ok since everything up there ^^ didn't make any sense here some good examples! Changing damage in CSS Code:
Code:
Code:
if you have any further questions or if you want me to add any new hooks i will be happy too... Credits BAILOPAN, LDuke, sawce, pred, sslice, cybermind, and everyone else on irc! thank you all Changelog
SOURCE CODE DOWNLOAD PACKAGE |
Re: [EXTENSION] Hooker *BETA
Great work!
|
Re: [EXTENSION] Hooker *BETA
Wow.
Great job... |
Re: [EXTENSION] Hooker *BETA
Man, this is excellent stuff.
|
Re: [EXTENSION] Hooker *BETA
great job!! :up::up:
few question 1. all client hook/unhook when they connect/disconnect game? 2. if hook HK_*Touch, it will hook all entity? 1000 entity in server, got lag? if entity remove it casue memory problem? i got this problem in "Hacks", it make a code error, like Code:
public OnClientPutInServer(client) add a player command hook, same as HK_OnTakeDamage per hook, allow remove client command (like IN_JUMP, IN_DUCK) |
Re: [EXTENSION] Hooker *BETA
I dunno if it is a bug or anything, I tried to blockHK_WeaponDrop, But in the game when someone wants to drop a weapon... It removed some of its ammos.
|
Re: [EXTENSION] Hooker *BETA
Looks awesome man!
|
Re: [EXTENSION] Hooker *BETA
Quote:
2. try not to hook every entity thats why i made the native 'AddHooksToEntity' to avoid having one forward for every game entity, if dont have a lot there wont be no lag issue, there shouldn't be a memory issue because sourcehook should unhook all of the hooks that are hooked when the entity because invalid Quote:
|
Re: [EXTENSION] Hooker *BETA
Code:
public OnPluginStart() |
Re: [EXTENSION] Hooker *BETA
franzcis066@: you are right, the weapon drop is still blocked but the secondary ammo clip gets removed, but the thing is that the extension does not touch the clients ammo or anything of some sort, it simply blocks the weapon drop if returned Plugin_Handled so i assume this an issue with the game it self, and you can't really know since the only gun you can't drop is a knife and it doesn't have any ammo, so your best luck just getting the client secondary ammo value then creating a timer just after the block and setting it back.
|
All times are GMT -4. The time now is 23:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.