14.08.2010, 06:24
I'm currently trying to make such a plugin that can load standard AMX modules (amxFile, amxTime, amxProcess etc), which come with the Pawn installation package, to be able to use their natives (i.e. without extracting them from source code and making another plugin - why do that if it's already compiled by someone else?).
The idea is that when a script gets loaded, the plugin looks into its library table and determines which modules should be loaded, and then tries to load them one by one from the %AMXLIB% directory. Every module has a special (exported) function called amx_<module_name>Init which then typically calls amx_Register to register natives.
So I've already made almost everything (I hope) but there's one problem - it doesn't work this way. It behaves like it doesn't affect on script's native table (I didn't checked though), and I'm now guessing what's wrong with my code or maybe this method...
Here's the whole code: http://zeex.pastebin.com/K0pmu4Ew
Any ideas why it doesn't work?
The idea is that when a script gets loaded, the plugin looks into its library table and determines which modules should be loaded, and then tries to load them one by one from the %AMXLIB% directory. Every module has a special (exported) function called amx_<module_name>Init which then typically calls amx_Register to register natives.
So I've already made almost everything (I hope) but there's one problem - it doesn't work this way. It behaves like it doesn't affect on script's native table (I didn't checked though), and I'm now guessing what's wrong with my code or maybe this method...
Here's the whole code: http://zeex.pastebin.com/K0pmu4Ew
Any ideas why it doesn't work?