getResourceExportedFunctions | Multi Theft Auto: Wiki Skip to content

getResourceExportedFunctions

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.


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.

OOP Syntax Help! I don't understand this!

  • Method: resource:getExportedFunctions(...)
  • Variable: .exportedFunctions

Syntax

table getResourceExportedFunctions ( [ [ resource theResource = getThisResource( ] )
Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.

  • resource theResource (default: getThisResource(): MISSING_PARAM_DESC

Returns

  • table: value

Returns a table of function names if successful, false otherwise.

Code Examples

shared

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