exportFunction

From GTA Connected
Jump to navigation Jump to search

Function Server and Client All Games Online and Offline

Server 1.0.0, Client 1.0.0

void exportFunction(string name, function Function)

Description

The exportFunction function is used to export a function so it can be used in other resources.

Parameters

Type Name Presence Default Value Description
string
name
required n/a The name of the exported function.
function
Function
required n/a The function to export.

Returns

Success Returns

Type Description
void
This function doesn't return any values on success.

Failure Returns

Type Value
void
n/a

Notes

Examples

Example 1 - JavaScript:

bindEventHandler("OnResourceStart", thisResource, function(event, resource) {
    exportFunction("testFunc", testFunc);
});

function testFunc(foo, bar) {
    return true;
}

Compatibility

There isn't any compatibility information for this function.

Related

Server Related

exportFunction
reflection.call
reflection.clone
reflection.createFunction
reflection.move
reflection.tostring


Client Related

exportFunction
reflection.call
reflection.clone
reflection.createFunction
reflection.move
reflection.tostring