Author Topic: Add-on enabled  (Read 841 times)

How would I check if an add-on is enabled through an if statement?

Something that would look like:
Code: [Select]
if(isAddonEnabled(addon))
Is there a built in function for this? Would I need to create the function? How would I create it?

%error = ForceRequiredAddOn("JVS_Content");

if(%error == $Error::AddOn_NotFound)
{
   error("x add-on is missing");
}

Of course, word it as you want. That will force the add-on on.

Without forcing it to be required though?

if($AddOn__Projectile_Pinball)
    echo("you have this add-on");

See config/server/ADD_ON_LIST.cs

if($AddOn__Projectile_Pinball)
    echo("you have this add-on");

See config/server/ADD_ON_LIST.cs
So, does that check if it's enabled? Or just if you have it?

So, does that check if it's enabled? Or just if you have it?
Enabled. I worded that wrong