Notice: Failed to invoke Pygments: [Called from MediaWiki\SyntaxHighlight\SyntaxHighlight::highlightInner in /home/pi/www/gtac/wiki/wiki/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php at line 334] in /home/pi/www/gtac/wiki/wiki/includes/debug/MWDebug.php on line 507

Notice: Failed to invoke Pygments: [Called from MediaWiki\SyntaxHighlight\SyntaxHighlight::highlightInner in /home/pi/www/gtac/wiki/wiki/extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlight.php at line 334] in /home/pi/www/gtac/wiki/wiki/includes/debug/MWDebug.php on line 507
natives.requestScript - GTA Connected

natives.requestScript

Function Client Only icon-iv.png Online and Offline

Available since Client 1.0.0
void natives.requestScript(string scriptName)
The natives.requestScript function is used to Requests a script to be loaded into memory so it can be started later.

Parameters

1) string scriptName Name of the script to request.

Return

void This function doesn't return a value.

Notes

  • - Must be called before natives.startNewScript to ensure the script is available- If the script does not exist, the request will silently fail.

Examples

Example 1 - JavaScript:

bindEventHandler("OnResourceReady", thisResource, function() {
    // Request the "trafficControl" script
    natives.requestScript("trafficControl");
});

Compatibility

There isn't any compatibility information for this function.