enable/disable whole plugin
Hello,
can anyone tell me how to add a cvar that when i put it 0, the whole plugin is disabled, and when put back 1, it starts the plugin from the start. Thanks |
Re: enable/disable whole plugin
Code:
|
Re: enable/disable whole plugin
Quote:
was i supposed to replace the "a" in pause and unpause with something? |
Re: enable/disable whole plugin
What do you mean?
|
Re: enable/disable whole plugin
Quote:
Code:
public plugin_init() |
Re: enable/disable whole plugin
1. You declare a global variables, example 'g_Cvar'
PHP Code:
PHP Code:
PHP Code:
|
Re: enable/disable whole plugin
Quote:
|
Re: enable/disable whole plugin
Craxor what have negative values to do with this?
Code:
|
Re: enable/disable whole plugin
And how do you expect a paused plugin to unpause itself? That's not possible. Either use the amx_pausecfg command, or you will need to add a bunch of checks for every piece of code inside the plugin.
@edon1337 - there's no point of using a cvar that can be changed only when the server restarts, neither would it work if you put in in plugin_init. |
Re: enable/disable whole plugin
Quote:
so i should just use an if() condition in all the publics i have in the plugin? |
| All times are GMT -4. The time now is 17:54. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.