getModuleInfo | Multi Theft Auto: Wiki Skip to content

getModuleInfo

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function returns information about the specified module.

Syntax

getModuleInfo ( )

Code Examples

server

This example adds a commandcheckmoduleswith which you can view information about currently loaded modules.

function printModuleInfo ( thePlayer )
local modules = getLoadedModules()
if #modules == 0 then
return outputConsole ( "There are no modules loaded!", thePlayer ) -- Return as no module is loaded, the for has nothing todo
end
for k, v in ipairs ( modules ) do
local moduleInfo = getModuleInfo ( v )
outputConsole ( moduleInfo.name .. "(" .. v .. ") v" .. moduleInfo.version .. ", author: " .. moduleInfo.author, thePlayer )
end
end
addCommandHandler ( "checkmodules", printModuleInfo )

See Also

Module Functions