SA-MP Forums Archive
Unable to hook OnPlayerClickPlayerTextDraw due to length - 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: Unable to hook OnPlayerClickPlayerTextDraw due to length (/showthread.php?tid=421812)



Unable to hook OnPlayerClickPlayerTextDraw due to length - MP2 - 10.03.2013

_ALS_OnPlayerClickPlayerTextDraw

32 characters. Max allowed is 31. Hurray!

I can't use y_hooks either for certain reasons. I need to use the old ALS method. Can I shorten it somehow without breaking the chaining?


Re: Unable to hook OnPlayerClickPlayerTextDraw due to length - Glad2BeHere - 11.03.2013

Removed. Y can't u use y_hooks?


Re: Unable to hook OnPlayerClickPlayerTextDraw due to length - mastermax7777 - 11.03.2013

U dont have to use _ALS_?

its not like its defned lol just change all to
_LOnPlayerClickPlayerTextDraw , should work no? c


Re: Unable to hook OnPlayerClickPlayerTextDraw due to length - ReneG - 11.03.2013

I thought _ALS_ was just a common naming prefix for hooking.


Re: Unable to hook OnPlayerClickPlayerTextDraw due to length - MP2 - 11.03.2013

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
I thought _ALS_ was just a common naming prefix for hooking.
I'm fairly certain that if you don't use ALS like that the chaining fucks up. I guess I should test it. I've never fully understood ALS hooking. All I know is it renames the next instance of the function to the prefix you specify. Not sure what the _ALS_ part does.


Re: Unable to hook OnPlayerClickPlayerTextDraw due to length - Azazelo - 11.03.2013

May Be like this ?
pawn Код:
#if defined OnPlayerClickTextDraw
    #undef OnPlayerClickTextDraw
    #define OnPlayerClickTextDraw MP2_OPCTDraw
    forward MP2_OPCTDraw(playerid, Text:clickedid);
#endif

// _ALS_MP2_OPCTDraw  // max len 17 Let me know is it work