Jump to content

How to get if a Mod is active?


Snakeman

Recommended Posts

Well i tried with this code but nothing happens... Mi still nil ... :/

 

    MI = nil;
    local mod = getModInfo("mods/morefishingitems/mod.info");
    if mod and mod:getId() == "morefishingitems" and mod:isModActive() then
        MI = true;
    end

Link to comment
Share on other sites

  • 1 month later...

its should be

 

for i=0, actmods:size()-1, 1 do

 

Here is my function to check if a mod is enabled:

 

function isModEnabled(modname)

    local actmods = getActivatedMods();
    for i=0, actmods:size()-1, 1 do
        if actmods:get(i) == modname then
            return true;
        end
    end
    return false;
end
Edited by nolanri
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...