MiscClientNot in this build

getScriptRouterContext

GET_SCRIPT_ROUTER_CONTEXT

The GTA V native GET_SCRIPT_ROUTER_CONTEXT of the MISC namespace, as LS:MP client scripts call it: the global function getScriptRouterContext, in JavaScript and in Lua.

SignatureJavaScript
getScriptRouterContext(contextData: null): boolean
SignatureLua
getScriptRouterContext(contextData: nil): boolean
⚠
Not in this game build

The global exists, but the native is not part of the game build LS:MP runs: calling it does nothing and returns undefined in JavaScript, nil in Lua. It never throws. See Coverage.

Usage

JavaScript
const result = getScriptRouterContext(null);
Lua
local result = getScriptRouterContext(nil)

Parameters

ParameterTypeJavaScriptLua
contextDataAny*nullnil

Returns

BOOL JavaScript boolean, Lua boolean

Reference

Namespace
Misc MISC
In the game
BOOL GET_SCRIPT_ROUTER_CONTEXT(Any* contextData)

Open in the interactive natives reference