[Include] M_Functions.inc [REQUIRES: Y_Hooks][EARLY RELEASE]
#1

Deleted, not worth beeing an include. Pastebin will still be below.

Pastebin
Reply
#2

Won't that OnPlayerUpdate cause lag? Wouldn't it be better to use a timer instead?
Reply
#3

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
Reply
#4

Quote:
Originally Posted by patrickgtr
View Post
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.
Reply
#5

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.
Reply
#6

Quote:
Originally Posted by patrickgtr
View Post
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)