The Lab
SCRIPT native

START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS

returns int4 paramsbuild 1207

Starts a new thread for the script scriptHash with argCount arguments from args, and returns its thread id.

Signature

C
int START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS(Hash scriptHash, Any* args, int argCount, int stackSize); // 0xC4BB298BD441BE78 b1207

Parameters

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

Facts

Facts about START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS
Name
START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS
Hash
0xC4BB298BD441BE78
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(0xC4BB298BD441BE78, -- START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS
  GetHashKey("name"), -- Hash scriptHash
  Citizen.PointerValueInt(), -- Any* args
  0, -- int argCount
  0, -- int stackSize
  Citizen.ResultAsInteger()
)
print(result, args)
JavaScript
const [result, args] = Citizen.invokeNative("0xC4BB298BD441BE78", // START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS
  GetHashKey("name"), // Hash scriptHash
  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)0xC4BB298BD441BE78, // START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS
  (uint)API.GetHashKey("name"), // Hash scriptHash
  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.