Hook 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 callback (
/showthread.php?tid=596535)
Hook callback -
TheArrow - 19.12.2015
Hello , I would like to know if it's possible to hook the same callback in several times with y_hooks.
Thanks.
Re: Hook callback -
PaulDinam - 19.12.2015
hook callbackname(args)
{
return 1;
}
Re: Hook callback -
TheArrow - 19.12.2015
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"
Re: Hook callback - Patrick - 19.12.2015
You should include y_hooks at every file to avoid this error.
Re: Hook callback -
TheArrow - 19.12.2015
Thanks Patrick !