SA-MP Forums Archive
Hook custom callback - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Hook custom callback (/showthread.php?tid=551697)



Hook custom callback - kadaradam - 20.12.2014

Hey,

I have some custom callbacks, and i want to hook them, so i can use them in an another file. I'm using the y_hook libary to hook deafult callbacks such as: OnPlayerConnect(), etc.. But it doesn't allow me to hook my custom callbacks, like:
Код:
OnMinigameStart()
OnCountStart()
OnMinigameEnd()
So what should i do?


Re: Hook custom callback - kadaradam - 20.12.2014

Yeah, but is the YSI 4.0 stable? I heard rumors that, there are still bugs in the 4.0.

By the way, thanks for the help.


Re: Hook custom callback - Abagail - 20.12.2014

It is stable, ofcourse. It works, and does its job. No releases of anything in the history of the universe(coding wise) have been fully bug-free.


Re: Hook custom callback - kadaradam - 21.12.2014

Ok, i updated to 4.0. I have a little problem. Sometimes the pawno crashes, when i compile my gamemode. Sometimes it works, sometimes it's not (usually after i restart the pawno it works). I dont know what's the problem, but it's annyoing.

Do you know how to fix this?

And i also had the
Код:
"@yH_OnPlayerClickPlayerTextDraw" is truncated to 31 characters
warning, but i managed to fix it with this post: http://forum.sa-mp.com/showpost.php?...54&postcount=3

EDIT:
Ok i have a new error, which was not there before. When i start my server, i see this in my console:
Код:
YSI Fatal Error: Could not write function name in "Hooks_MakePublicPointer".