Hello,
Do anyone here know how to write the correct lines of script in lua that will make an addon inactivated or hidden in battlegrounds when you are in them, but activated or shown when you are outside of any battleground?
And could you write the lines of script here in the comment for me to add to the addon in the right place in its code?

Example would be addons like:

LoseControl (https://www.curseforge.com/wow/addon...ownload/417954)
eBar (http://www.mediafire.com/file/avo1zh.../eBar.zip/file)

I add the links incase you need to see code for the addon, incase it is more complicated than I thought. (I do not know codes)

Thank you so much!