[HELP] Ham Reload Post
So im trying to hook that moment when the weapon is done reloading in order to set a custom clip to a weapon
i have tried this, but for some reason it is called when reload is triggered, not when it ends, any ideea why? Code:
RegisterHam(Ham_Weapon_Reload, "weapon_deagle", "Ham_Weapon_Reload_Post", 1) |
Re: [HELP] Ham Reload Post
Quote:
That's what i found: https://forums.alliedmods.net/showth...ht=hook+reload |
Re: [HELP] Ham Reload Post
Reload is called when a user presses +reload (R by default). Looks like you don't really understand what a "post" hook is.
If you register a hook as "pre", you are able to intercept (supercede) it, or change original function call's arguments and return value. It means that your hook is called before the original function. "Post" means that your hook is called after the original function call. There are no special cases like "Pre-hook happens before reload happens, and post-hook happens when the reload ends". |
Re: [HELP] Ham Reload Post
Thanks craxor, xPaw's tutorial made it clear for me, ham reload post is called after releasing the R button, not after the reload is done..
Kippy, you didnt understand what i meant above... |
Re: [HELP] Ham Reload Post
Quote:
|
Re: [HELP] Ham Reload Post
ohh, i guess i didnt read your post properly... xD
sorry, i just woke up when i wrote that.. =P |
| All times are GMT -4. The time now is 09:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.