y_hooks hook stops the original callback from executing
#1

Hi guys. I've noticed that whilst the server calls my OnPlayerDisconnect hook in my include, it doesn't call my OnPlayerDisconnect callback in my main script.

Here is my include:
pawn Код:
#include <YSI\y_hooks>

hook OnPlayerDisconnect(playerid, reason) {
    print("hook opd");
    return 1;
}
and in my script:

pawn Код:
public OnPlayerDisconnect(playerid, reason) {
    print("script opd");
    return 1;
}
"hook opd" is printed, but not "script opd". If I remove the hook, "script opd" is printed.
Reply
#2

Try removing "return 1;" from the hooked callback.
Reply
#3

I tried that but it also didn't work. I also tried return -2 but that didn't work either.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)