exportFunction: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
No edit summary
 
(No difference)

Latest revision as of 15:13, 27 April 2020

Function 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

void exportFunction(string name, function Function)

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

Parameters

1) string name The name of the exported function.
2) function Function The function to export.

Return

void This function doesn't return a value.

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

icon-iii.png icon-vc.png icon-sa.png icon-iv.png exportFunction

icon-iii.png icon-vc.png icon-sa.png icon-iv.png reflection.call
icon-iii.png icon-vc.png icon-sa.png icon-iv.png reflection.clone
icon-iii.png icon-vc.png icon-sa.png icon-iv.png reflection.createFunction
icon-iii.png icon-vc.png icon-sa.png icon-iv.png reflection.move
icon-iii.png icon-vc.png icon-sa.png icon-iv.png reflection.tostring


Client Related

icon-iii.png icon-vc.png icon-sa.png icon-iv.png exportFunction

icon-iii.png icon-vc.png icon-sa.png icon-iv.png reflection.call
icon-iii.png icon-vc.png icon-sa.png icon-iv.png reflection.clone
icon-iii.png icon-vc.png icon-sa.png icon-iv.png reflection.createFunction
icon-iii.png icon-vc.png icon-sa.png icon-iv.png reflection.move
icon-iii.png icon-vc.png icon-sa.png icon-iv.png reflection.tostring