AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Overriding or disabling a command registered by another plugin (https://forums.alliedmods.net/showthread.php?t=341461)

ghostdlr 01-23-2023 09:15

Overriding or disabling a command registered by another plugin
 
My plugin is using the same commands as statsx: /rank /top15 .

Is there any way to disable these statsx commands programatically ? (without asking the user to disable the statsx plugin)

I would prefer not to disable the statsx plugin because it has a lot more functionalities besides rank and top.

damage220 01-23-2023 10:24

Re: Overriding or disabling a command registered by another plugin
 
If you place your plugin above the statsx in plugins.ini, all it's registered commands will have higher priority.

lexzor 01-23-2023 10:35

Re: Overriding or disabling a command registered by another plugin
 
try using amx_statscfgmenu and put your plugin above stats in plugins.ini.


also, if the function from statsx it is still called, try to block user chat message hooking user say and say_team, check if the message from chat is the same with your command and use return PLUGIN_HANDLED;


All times are GMT -4. The time now is 10:12.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.