Hook callback
#1

Hello , I would like to know if it's possible to hook the same callback in several times with y_hooks.

Thanks.
Reply
#2

hook callbackname(args)
{
return 1;
}
Reply
#3

Yes I know but I would like hook 3 times the same callback, like this:

pawn Код:
// File 1

public OnGameModeInit()
{
    printf("ok1");
        return 1;
}


// File 2

hook OnGameModeInit()
{
    printf("ok2");
    return 1;
}

// File 3

hook OnGameModeInit()
{
    printf("ok3");
    return 1;
}
Error returned:

error 021: symbol already defined: "@yH_OnGameModeInit@001"
Reply
#4

You should include y_hooks at every file to avoid this error.
Reply
#5

Thanks Patrick !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)