[Include] M_Functions.inc [REQUIRES: Y_Hooks][EARLY RELEASE] - 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: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] M_Functions.inc [REQUIRES: Y_Hooks][EARLY RELEASE] (
/showthread.php?tid=610326)
M_Functions.inc (Deleted) -
Luicy. - 22.06.2016
Deleted, not worth beeing an include. Pastebin will still be below.
Pastebin
Re: M_Functions.inc [REQUIRES: Y_Hooks][EARLY RELEASE] -
Private200 - 22.06.2016
Won't that OnPlayerUpdate cause lag? Wouldn't it be better to use a timer instead?
Re: M_Functions.inc [REQUIRES: Y_Hooks][EARLY RELEASE] -
SecretBoss - 22.06.2016
y_hooks is a bad way to hook your callback since it is outdated and not compatible with many gamemodes
I would suggest you to do the hooking alone, you can take examples of some already-made includes
Also you don't need to include y_hooks before every hooking and instead of using
new you can use
static and for
stocks use
stock static
Re: M_Functions.inc [REQUIRES: Y_Hooks][EARLY RELEASE] -
Crayder - 22.06.2016
Quote:
Originally Posted by patrickgtr
I don't know where you got your information about y_hooks is outdated but y_hooks pretty much does the same but without the messy defines. secondly you need to include y_hooks every time you need to hook a function otherwise it will show an error saying that its already defined/hooked, even though he could've improved the code, I don't know why he had to hook OnPlayerConnect and OnPlayerDisconnect more than once with containing only 1 code.
|
The correct way to use y_hookd is including it ONCE in every file it will be used. You should not be hooking callbacks multiple times in the same file.
Re: M_Functions.inc [REQUIRES: Y_Hooks][EARLY RELEASE] -
Gammix - 22.06.2016
OnVehicleUpdate doesn't cover movement changes.
Your OnVehicleUpdate is just calling an extra callback through default vehicle callbacks, which makes no sense of using it.
Re: M_Functions.inc [REQUIRES: Y_Hooks][EARLY RELEASE] -
SecretBoss - 23.06.2016
Quote:
Originally Posted by patrickgtr
I don't know where you got your information about y_hooks is outdated but y_hooks pretty much does the same but without the messy defines. secondly you need to include y_hooks every time you need to hook a function otherwise it will show an error saying that its already defined/hooked, even though he could've improved the code, I don't know why he had to hook OnPlayerConnect and OnPlayerDisconnect more than once with containing only 1 code.
|
Crayder covered me about including. As for outdated yea it is outdated because callbacks change with every samp's release and if you are using for a example a 0.3.7 include you will get tons of errors. Also including y_hook will also include some other YSI files which is a problem for some gamemodes.
Just use ALS hooking method, its easy and quick