GetLoadedModules

From Multi Theft Auto: Wiki
Revision as of 13:51, 18 May 2009 by Robhol (talk | contribs) (Added.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function returns all the currently loaded modules of the server.

Syntax

table getLoadedModules ()

Returns

Returns a table of all the currently loaded modules. If no modules are loaded, the table will be empty.

Example

function checkModules()
	local modules = getLoadedModules()
	
	if #modules == 0 then
		outputServerLog("No modules are loaded!")
	else
	
		for k,v in ipairs(modules) do
			outputServerLog( v )
		end
		
		outputServerLog("Loaded " .. #modules .. " modules in total.")
	end
end
addCommandHandler("modules", checkModules)

See Also