The Lab
SCRIPT native

START_NEW_SCRIPT_WITH_ARGS

returns int4 paramsbuild 1207

Starts a new thread running scriptName and passes it argCount arguments from args. Returns the thread id.

Signature

C
int START_NEW_SCRIPT_WITH_ARGS(const char* scriptName, Any* args, int argCount, int stackSize); // 0xB8BA7F44DF1575E1 b1207

Parameters

#NameType
1scriptNameconst char*
2argsAny* (out pointer)
3argCountint
4stackSizeint

Facts

Facts about START_NEW_SCRIPT_WITH_ARGS
Name
START_NEW_SCRIPT_WITH_ARGS
Hash
0xB8BA7F44DF1575E1
Namespace
Returns
int
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result, args = Citizen.InvokeNative(0xB8BA7F44DF1575E1, -- START_NEW_SCRIPT_WITH_ARGS
  "text", -- const char* scriptName
  Citizen.PointerValueInt(), -- Any* args
  0, -- int argCount
  0, -- int stackSize
  Citizen.ResultAsInteger()
)
print(result, args)
JavaScript
const [result, args] = Citizen.invokeNative("0xB8BA7F44DF1575E1", // START_NEW_SCRIPT_WITH_ARGS
  "text", // const char* scriptName
  Citizen.pointerValueInt(), // Any* args
  0, // int argCount
  0, // int stackSize
  Citizen.resultAsInteger()
);
console.log(result, args)
C#
var argsArg = new OutputArgument();
int result = Function.Call<int>((Hash)0xB8BA7F44DF1575E1, // START_NEW_SCRIPT_WITH_ARGS
  "text", // const char* scriptName
  argsArg, // Any* args
  0, // int argCount
  0 // int stackSize
);
int args = argsArg.GetResult<int>();
All SCRIPT natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.