Raised This Month: $51 Target: $400
 12% 

Overriding or disabling a command registered by another plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ghostdlr
Senior Member
Join Date: Aug 2010
Old 01-23-2023 , 09:15   Overriding or disabling a command registered by another plugin
Reply With Quote #1

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.
ghostdlr is offline
damage220
Member
Join Date: Jul 2022
Location: Ukraine
Old 01-23-2023 , 10:24   Re: Overriding or disabling a command registered by another plugin
Reply With Quote #2

If you place your plugin above the statsx in plugins.ini, all it's registered commands will have higher priority.

Last edited by damage220; 01-23-2023 at 10:26.
damage220 is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 01-23-2023 , 10:35   Re: Overriding or disabling a command registered by another plugin
Reply With Quote #3

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;
lexzor is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:44.


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