Raised This Month: $32 Target: $400
 8% 

disable plugin from inside another plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Watermelonnable
Member
Join Date: Feb 2017
Old 12-04-2019 , 14:54   disable plugin from inside another plugin
Reply With Quote #1

So under some conditions given by plugin B I want to disable plugin A. Is this possible?
Watermelonnable is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 12-04-2019 , 15:23   Re: disable plugin from inside another plugin
Reply With Quote #2

Yes, but you can pause manually with console command: amxx pause plugin

Ps.
For pause inside a plugin try server_cmd("amxx pause pluginname");
Or other function that i can't remember now
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-04-2019 , 15:41   Re: disable plugin from inside another plugin
Reply With Quote #3

You should have posted this in the Scripting Help section.

You can use the command as ^SmileY said, but if you're doing it from inside a plugin, you should use the "pause" function.

Code:
pause("ac", "plugin_name.amxx")
__________________

Last edited by OciXCrom; 12-04-2019 at 15:41.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Watermelonnable
Member
Join Date: Feb 2017
Old 12-04-2019 , 19:52   Re: disable plugin from inside another plugin
Reply With Quote #4

Quote:
Originally Posted by OciXCrom View Post
You should have posted this in the Scripting Help section.

You can use the command as ^SmileY said, but if you're doing it from inside a plugin, you should use the "pause" function.

Code:
pause("ac", "plugin_name.amxx")
Nice! Thank you. And how do I start the plugin again?

Regarding the section, I'm a little bit confused right now then because another user told me to post here when I don't have any code
Watermelonnable is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-04-2019 , 21:06   Re: disable plugin from inside another plugin
Reply With Quote #5

Quote:
Originally Posted by Watermelonnable View Post
Regarding the section, I'm a little bit confused right now then because another user told me to post here when I don't have any code
If you're writing your own code (or editing a plugin on your own) and have questions/issues, you post in the Scripting Help section. Typically, there will be people who request complete code (whole plugins or even just whole functions) which often gets the response of "post in the request section" because it's a clear indication that they are not going to make an effort to write their own code. People who help out around here do so voluntarily and don't want to waste time on people who won't actually get any benefit of their help.

I'm not sure what you requested and was told to post elsewhere so I can't tell if this is or isn't the case with your inquiries.

So, if you're going to make the effort to write your own code, it's best to try what you are trying to do first. If you can't get it to work, post your question and most importantly a description of your actual goal with the code that you tried. If you do this, you're more likely to get consistent help.

Obviously, in this case, you didn't have speciifc code but you're asking about a scripting question (because presumably, you're going to write your own code using this info).
__________________

Last edited by fysiks; 12-04-2019 at 21:07.
fysiks is offline
ZaX
Senior Member
Join Date: Jan 2015
Old 12-04-2019 , 22:28   Re: disable plugin from inside another plugin
Reply With Quote #6

Quote:
Originally Posted by Watermelonnable View Post
Nice! Thank you. And how do I start the plugin again?

Regarding the section, I'm a little bit confused right now then because another user told me to post here when I don't have any code
https://www.amxmodx.org/api/amxmodx/pause
https://www.amxmodx.org/api/amxmodx/unpause
ZaX is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-05-2019 , 08:05   Re: disable plugin from inside another plugin
Reply With Quote #7

Quote:
Originally Posted by Watermelonnable View Post
Nice! Thank you. And how do I start the plugin again?
Same way, only you would use "unpause". You should check the API and search for functions before posting a thread. Most of the time the function names are self-explanatory, so it's pretty easy to find what you're looking for by using the search option.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Watermelonnable
Member
Join Date: Feb 2017
Old 12-05-2019 , 10:18   Re: disable plugin from inside another plugin
Reply With Quote #8

Quote:
Originally Posted by OciXCrom View Post
Same way, only you would use "unpause". You should check the API and search for functions before posting a thread. Most of the time the function names are self-explanatory, so it's pretty easy to find what you're looking for by using the search option.
Thank you. I'll do. One more question. Do paused plugins need the server to be reloaded to take effect? or is it immediate?
Watermelonnable is offline
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 12-05-2019 , 10:47   Re: disable plugin from inside another plugin
Reply With Quote #9

Quote:
Originally Posted by Watermelonnable View Post
Thank you. I'll do. One more question. Do paused plugins need the server to be reloaded to take effect? or is it immediate?
nope.
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
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 01:04.


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