GetResourceExportedFunctions: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server function}} | {{Server client function}} | ||
Returns a table containing the names of the functions that a resource exports. | Returns a table containing the names of the functions that a resource exports. | ||
{{New feature|3.0110|1.1| | {{New feature|3.0110|1.1| | ||
Only available server-side for 1.0.x | |||
}} | }} | ||
Revision as of 12:02, 13 September 2011
Returns a table containing the names of the functions that a resource exports.
Only available server-side for 1.0.x
Syntax
table getResourceExportedFunctions ( resource res )
Required Arguments
- res: the resource of which you want to know the exported functions.
Returns
Returns a table of function names if successful, false otherwise.
Example
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
See Also
- abortRemoteRequest
- call
- fetchRemote
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceName
- getResourceRootElement
- getResourceState
- getThisResource
- getRemoteRequests
- getRemoteRequestInfo