{"hash":"0xC4BB298BD441BE78","ns":"SCRIPT","name":"START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS","slug":"START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS","official":true,"named":true,"luaName":"StartNewScriptWithNameHashAndArgs","game":"rdr3","apiset":"client","returnType":"int","params":[{"name":"scriptHash","type":"Hash"},{"name":"args","type":"Any*"},{"name":"argCount","type":"int"},{"name":"stackSize","type":"int"}],"summary":"","descriptions":[],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","gtaHash":"0xC4BB298BD441BE78","gtaJhash":"0xE38A3AD4","sources":["alloc8or"],"doc":1,"url":"https://natives.borderlinerp.com/natives/SCRIPT/START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS","markdownUrl":"https://natives.borderlinerp.com/natives/SCRIPT/START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS.md","snippets":{"lua":"local retval, args = StartNewScriptWithNameHashAndArgs(scriptHash, argCount, stackSize)","luaInvoke":"local retval, args = Citizen.InvokeNative(0xC4BB298BD441BE78, scriptHash, Citizen.PointerValueInt(), argCount, stackSize, Citizen.ResultAsInteger())","js":"const [retval, args] = StartNewScriptWithNameHashAndArgs(scriptHash, argCount, stackSize);","jsInvoke":"const [retval, args] = Citizen.invokeNative('0xC4BB298BD441BE78', scriptHash, Citizen.pointerValueInt(), argCount, stackSize, Citizen.returnResultAnyway(), Citizen.resultAsInteger());","csharp":"var args = new OutputArgument();\nint retval = Function.Call<int>((Hash)0xC4BB298BD441BE78, scriptHash, args, argCount, stackSize);\n// args.GetResult<int>()","notes":["Hash parameters: the named function also accepts a string and hashes it for you; `Citizen.InvokeNative` needs the number — pass `joaat(\"name\")` or a backtick literal like `` `name` ``.","Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.","`Any*` arguments are often structs. Build them with a DataView buffer and pass it with `:Buffer()` — see the examples and notes below."]}}