"Unregister" or block command?
Is there a way to "take over" a command registered by another plugin without putting my plugin above the one registering it in plugins.ini? Or if not, is there a way to block that command?
I have my own plugin which uses amx_ban and another alternative command for the same function. I want to block the amx_ban command from admincmd so that only the alternative command from my plugin works if it is not above admincmd in plugins.ini (if it is, both will work). |
Re: "Unregister" or block command?
if I got you right:
disassemble the plugin (can only be done if it was compiled before latest amxmodx version) and read the strings for possible commands. |
Re: "Unregister" or block command?
Just remove the register_concmd line from the plugin that registers it
|
Re: "Unregister" or block command?
Code:
|
Re: "Unregister" or block command?
Quote:
Quote:
|
Re: "Unregister" or block command?
Quote:
If you still do not want to edit the plugin, then put your plugin above the other and simply return PLUGIN_HANDLED to prevent the execution of the other plugin |
Re: "Unregister" or block command?
Quote:
|
Re: "Unregister" or block command?
Then that is their problem, not yours.
|
Re: "Unregister" or block command?
Quote:
Without plugin: Code:
] amx_ban testCode:
] amx_ban testCode:
Code:
Code:
plugin_init() admincmd |
Re: "Unregister" or block command?
^
Lol it actually works. Though I still don't understand how come. :D |
| All times are GMT -4. The time now is 05:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.