getLoadedModules
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function returns all the currently loaded modules of the server.
Syntax
table getLoadedModules ( )Returns
- table: value
Returns a table of all the currently loaded modules . If no modules are loaded, the table will be empty.
Code Examples
shared
Adds a command that lists all loaded modules in the server log.
function checkModules() local modules = getLoadedModules()
if #modules == 0 then return outputServerLog("No modules are loaded!") end
for k,v in ipairs(modules) do outputServerLog( v ) end
outputServerLog("Loaded " .. #modules .. " modules in total.")endaddCommandHandler("modules", checkModules)