resource.getExport

From GTA Connected
Jump to navigation Jump to search

Method Server and Client All Games Online and Offline

Server 1.0.0, Client 1.0.0

mixed resource.getExport(string exportName)

Description

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

Parameters

Type Name Presence Default Value Description
string
exportName
required n/a The name of the exported variable.

Returns

Success Returns

Type Description
mixed
The exported value.

Failure Returns

Type Value
null
n/a

Types

This method can only be used on type:

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

findResourceByName
getResources
setErrorMode
thisResource

resource.exports
resource.getExport
resource.isStarted
resource.isStarting
resource.name
resource.restart
resource.start
resource.stop


Client Related

findResourceByName
getResources
setErrorMode
thisResource

resource.exports
resource.getExport
resource.isReady
resource.isStarted
resource.isStarting
resource.name
resource.restart
resource.start
resource.stop