resource.getExport

From GTA Connected
Revision as of 15:17, 27 April 2020 by Vortrex (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Method Server and Client icon-iii.png icon-vc.png icon-sa.png icon-iv.png Online and Offline

Available since Server 1.0.0, Client 1.0.0

mixed resource.getExport(string exportName)

The resource.getExport method is used to get an exported function.

Parameters

1) string exportName The name of the exported variable.

Return

mixed The exported value.

Types

Shared Resource

Notes

Examples

Example 1 - JavaScript - Server-Side:

var getSkinName = findResourceByName("utils").getExport("getSkinName"); let skinName = getSkinName(skinID);


Example 2 - Lua - Server-Side:

local getSkinName = findResourceByName("utils").getExport("getSkinName"); local skinName = getSkinName(skinID)


Example 3 - Squirrel - Server-Side:

local getSkinName = findResourceByName("utils").getExport("getSkinName"); let skinName = getSkinName(skinID);

Compatibility

There isn't any compatibility information for this method.

Related

Server Related

icon-iii.png icon-vc.png icon-sa.png icon-iv.png findResourceByName
icon-iii.png icon-vc.png icon-sa.png icon-iv.png getResources
icon-iii.png icon-vc.png icon-sa.png icon-iv.png thisResource

icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.exports
icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.getExport
icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.isStarted
icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.isStarting
icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.name
icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.restart
icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.start
icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.stop


Client Related

icon-iii.png icon-vc.png icon-sa.png icon-iv.png findResourceByName
icon-iii.png icon-vc.png icon-sa.png icon-iv.png getResources
icon-iii.png icon-vc.png icon-sa.png icon-iv.png thisResource

icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.exports
icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.getExport
icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.isReady
icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.isStarted
icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.isStarting
icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.name
icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.restart
icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.start
icon-iii.png icon-vc.png icon-sa.png icon-iv.png resource.stop