AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   if(amx_off) (https://forums.alliedmods.net/showthread.php?t=136294)

fabrizio guespe 08-24-2010 21:32

if(amx_off)
 
is there a way of knowing is the amx is off or on?.

Lets say my plugin already has the public plugin_cfg. But i wanted to change some prints if the amx is off.

Thanks

fysiks 08-24-2010 22:06

Re: if(amx_off)
 
I can't find any method to do that but if you edit pausecfg.sma you could add in a cvar (or public variable) that would indicate it's status (on or off).

fabrizio guespe 08-24-2010 22:09

Re: if(amx_off)
 
Quote:

Originally Posted by fysiks (Post 1281043)
I can't find any method to do that but if you edit pausecfg.sma you could add in a cvar (or public variable) that would indicate it's status (on or off).

the i count with that, thank you anyway

Seta00 08-24-2010 23:36

Re: if(amx_off)
 
AFAIK if the AMX is off, you won't be able to do anything :grrr:

nikhilgupta345 08-24-2010 23:56

Re: if(amx_off)
 
Well, you could check how the command amx_on works? Cause amx_off doesn't turn that off, or the plugin that has amx_on in it makes it work when amx is off.

Just a thought.

fysiks 08-25-2010 00:04

Re: if(amx_off)
 
Quote:

Originally Posted by Seta00 (Post 1281077)
AFAIK if the AMX is off, you won't be able to do anything :grrr:

No. That's what i thought at first but after looking into it it only pauses certain plugins. Plugins added to the pausecfg list will not be paused.

Quote:

Originally Posted by fabrizio guespe (Post 1281046)
the i count with that, thank you anyway

What? I just told you it is possible if I modify the pausecfg plugin (where amx_on and amx_off are executed). Then after that there will be a way to know when it is on or off.

DaxProxy 08-25-2010 06:17

Re: if(amx_off)
 
The workaround for that would be that you will keep AMXX running but you'd pause every plugin that wouldn't stop you to use your third party plugin.
And then make an dummy plugin, and check if it's running thru your own plugin...or something like that.

fysiks 08-25-2010 12:03

Re: if(amx_off)
 
Quote:

Originally Posted by DaxProxy (Post 1281237)
The workaround for that would be that you will keep AMXX running but you'd pause every plugin that wouldn't stop you to use your third party plugin.

That's already how amx_off works. If you don't want it paused you just add it to the pause config.

Turkish 08-25-2010 13:39

Re: if(amx_off)
 
if amx is off your plugin wouldn't work

fysiks 08-25-2010 13:40

Re: if(amx_off)
 
Quote:

Originally Posted by Turkish (Post 1281564)
if amx is off your plugin wouldn't work

Quote:

Originally Posted by fysiks (Post 1281098)
No. That's what i thought at first but after looking into it it only pauses certain plugins. Plugins added to the pausecfg list will not be paused.



All times are GMT -4. The time now is 21:57.

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