Concept for native function hooks
#1



In a module based script, there's times where I need to hook a native function more than once.. I've been trying to figure out a way to keep the actual SetPlayerArmor intact, then have additional code hooked onto that function. My idea was to have main.pwn basically be a header hook that has the actual function inside it; then the rest acting as added code. I'm curious to see what others think of this. It's almost like turning SetPlayerArmor into a callback; with additional hooks added.
Reply
#2

I'm having the exact same problem. I have 10 include files, each with OnPlayerClickPlayerTextDraw hooked. All 10 files may, or may not come together in the end - this is my problem. A header file would be fine, if I didn't want each include to be stand-alone. I would prefer to hook once and call each includes own function, but that means knowing what files are included in advance. I don't want that if it can be helped.

I'm very new to multi-file scripting. Any documentation/tutorials on this subject would be appreciated.
Reply
#3

You should organize the documentation in an easier to read format.. This isn't the first time I've seen someone have a question, that is already documented deep in the pile of posts.


EDIT:
I'd be willing to help you document; I know what YSI is capable of, but without clear documentation of all that it can do.. its basically not seeing its full potential.
Reply
#4

Quote:
Originally Posted by Chaprnks
View Post
You should organize the documentation in an easier to read format.. This isn't the first time I've seen someone have a question, that is already documented deep in the pile of posts.


EDIT:
I'd be willing to help you document; I know what YSI is capable of, but without clear documentation of all that it can do.. its basically not seeing its full potential.
*cough* https://sampforum.blast.hk/showthread.php?tid=166016 *cough*
Reply
#5

Quote:
Originally Posted by MP2
View Post
Quote:
Originally Posted by Chaprnks
View Post
You should organize the documentation in an easier to read format.. This isn't the first time I've seen someone have a question, that is already documented deep in the pile of posts.


EDIT:
I'd be willing to help you document; I know what YSI is capable of, but without clear documentation of all that it can do.. its basically not seeing its full potential.
*cough* https://sampforum.blast.hk/showthread.php?tid=166016 *cough*
*doublecough* http://ysi.wikia.com/wiki/YSI_Wiki *cough*
Reply
#6

Quote:
Originally Posted by LarzI
View Post
Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)