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

AddCommandOverride help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheeDeer
Junior Member
Join Date: Dec 2016
Old 06-02-2017 , 23:34   AddCommandOverride help
Reply With Quote #1

So, im a bit confused on how AddCommandOverride works. Does it override lets say sm_mute with a new function or does it just change the admin flag of the command?

I am looking to disable commands such as sm_mute sm_kick etc and replace them with a new function without actually disabling the plugins any ideas?
TheeDeer is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 06-03-2017 , 05:00   Re: AddCommandOverride help
Reply With Quote #2

You're looking for AddCommandListener.
__________________
asherkin is offline
TheeDeer
Junior Member
Join Date: Dec 2016
Old 06-03-2017 , 16:26   Re: AddCommandOverride help
Reply With Quote #3

Quote:
Originally Posted by asherkin View Post
You're looking for AddCommandListener.
But that will still run the original commands function. I need to override the original command in this case sm_mute with a new function.
TheeDeer is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 06-03-2017 , 16:27   Re: AddCommandOverride help
Reply With Quote #4

Quote:
Originally Posted by TheeDeer View Post
But that will still run the original commands function. I need to override the original command in this case sm_mute with a new function.
This is in the documentation: https://sm.alliedmods.net/new-api/co...ommandListener
__________________
asherkin 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 22:35.


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