lists of modules in script

Avatar

By soulplexis 10 September 2019 22:13

Donator · 479 comments

I wanna do something like:

var listofmodules = [list a bunch of modules seperately in here]

then do something like:

if( [any module inside listofmodules] is enabled) {
chat.print( [the module] + " is enabled"]

}

【ソルプレクサス】

Avatar

By CzechHek 10 September 2019 22:27

Member · 314 comments

That's too simple.

var listofmodules = ["KillAura", "ChestStealer", "InventoryCleaner"]

function isEnabled() {
    for (var i = 0; i < listofmodules.length; i++) {
        if (moduleManager.getModule(listofmodules[i]).state) {
            chat.print(listofmodules[i] + " is enabled")
        }
    }
}

Last edited by CzechHek (10 September 2019 22:28)


ScriptAPI Developer.
Experienced YouTuber.
Discord: v.ht/DYSKORD
YouTube: v.ht/CzechHek

Avatar

By soulplexis 11 September 2019 04:21

Donator · 479 comments
CzechHek wrote

That's too simple.

var listofmodules = ["KillAura", "ChestStealer", "InventoryCleaner"]

function isEnabled() {
    for (var i = 0; i < listofmodules.length; i++) {
        if (moduleManager.getModule(listofmodules[i]).state) {
            chat.print(listofmodules[i] + " is enabled")
        }
    }
}

yo man thank s


【ソルプレクサス】