Hooking, Did i code it right? - 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: Hooking, Did i code it right? (
/showthread.php?tid=281830)
Hooking, Did i code it right? -
dowster - 08.09.2011
pawn Code:
public OnGameModeInit()
{
BACKG = TextDrawCreate( BACKG_ANCHOR_X, BACKG_ANCHOR_Y, " ");
#if defined OnGameModeInit
#undef OnGameModeInit
#endif
reg_OnGameModeInit();
return 1;
}
It should check if OnGameModeInit was already defined, and undefine it so it can have its own define. I'm just wondering if it will work like this.
Re: Hooking, Did i code it right? -
JaTochNietDan - 08.09.2011
Errr...not really, you can see a tutorial on the ALS hooking method here:
https://sampforum.blast.hk/showthread.php?tid=257127
Re: Hooking, Did i code it right? -
dowster - 08.09.2011
Sorry forgot the other code where I redefined it but it didn't work anyways, I'll check that thread tomorrow when I can get on the computer