getResourceExportedFunctions | Multi Theft Auto: Wiki Skip to content

getResourceExportedFunctions

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.


Returns a table containing the names of the functions that a resource exports. It will return the exports of the current resource if there is no argument passed in.

Syntax

getResourceExportedFunctions ( )

Code Examples

server

This simple example will output the names of the functions that the "scoreboard" resource exports.

local res = getResourceFromName ( "scoreboard" )
if res then
local functionNames = getResourceExportedFunctions ( res )
outputConsole ( "The scoreboard resource exports " .. #functionNames .. " functions:" )
for i, name in ipairs ( functionNames ) do
outputConsole ( name )
end
else
outputConsole ( "Unable to find the scoreboard resource." )
end