plugin pause quest.
How would I get a plugin to pause itself effectively? I know there are the functions pause, unpause, plugin_pause, and plugin_unpause but it's worthless because if the plugin is renamed it won't pause itself. Is there a way to have the plugin find its own directory and name so I can make that the variable for the second parameter in pause(<flags>, <plugin>)?
|
Re: plugin pause quest.
Well if I'm thinking what you're thinking (a plugin that ONLY you can use and anyone who changes the name to avoid being caught with taking it), you could do something like create a FCVAR_SERVER CVAR so that it can be obtained by checking if that cvar is running, then somehow find the name of the plugin by parsing the data returned by maybe an "amxx cvars" like call.
There is probably a better, more effective and less kryptic way, but that's just my two cents :-). Slmclarengt |
Re: plugin pause quest.
Actually that isn't the idea. I don't care if they rename it considering my name will always be in the register Title and Author. I just want to have it so:
if(conditions not met) { plugin pauses itself by getting its own name then pausing itself OR if(conditions not met) { ignore all the rest of the plugin after this } |
Re: plugin pause quest.
Well I believe you can do:
Code:
Slmclarengt |
Re: plugin pause quest.
register_plugin() can safely be left out of any plugin without altering functionality. Just by not calling it will NOT stop the plugin.
|
Re: plugin pause quest.
I think with that double negative you're saying his method won't work. Anyone have a feasible method?
|
Re: plugin pause quest.
Depending on your conditions to be met, you could try this in plugin_precache()
Code:
pause("ade") |
Re: plugin pause quest.
That's a really good idea, it works. Ok, now my question is, how would could I get a server's own ip address?
|
Re: plugin pause quest.
Not sure of it but try
PHP Code:
PHP Code:
|
Re: plugin pause quest.
Just gave this a try and it works, thanks.
|
| All times are GMT -4. The time now is 10:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.