START_NEW_SCRIPT_WITH_NAME_HASH
Starts a new thread running the script with the name hash scriptHash and returns its thread id.
Signature
int START_NEW_SCRIPT_WITH_NAME_HASH(Hash scriptHash, int stackSize); // 0xEB1C67C3A5333A92 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | scriptHash | Hash |
| 2 | stackSize | int |
Facts
| Name | START_NEW_SCRIPT_WITH_NAME_HASH |
|---|---|
| Hash | 0xEB1C67C3A5333A92 |
| Namespace | |
| Returns | int |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result = Citizen.InvokeNative(0xEB1C67C3A5333A92, -- START_NEW_SCRIPT_WITH_NAME_HASH
GetHashKey("name"), -- Hash scriptHash
0, -- int stackSize
Citizen.ResultAsInteger()
)
print(result)const result = Citizen.invokeNative("0xEB1C67C3A5333A92", // START_NEW_SCRIPT_WITH_NAME_HASH
GetHashKey("name"), // Hash scriptHash
0, // int stackSize
Citizen.resultAsInteger()
);
console.log(result)int result = Function.Call<int>((Hash)0xEB1C67C3A5333A92, // START_NEW_SCRIPT_WITH_NAME_HASH
(uint)API.GetHashKey("name"), // Hash scriptHash
0 // int stackSize
);Related SCRIPT natives
- START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS
- START_NEW_SCRIPT_WITH_ARGS
- START_NEW_SCRIPT
- SET_SCRIPT_WITH_NAME_HASH_AS_NO_LONGER_NEEDED
- DOES_SCRIPT_WITH_NAME_HASH_EXIST
- HAS_SCRIPT_WITH_NAME_HASH_LOADED
- REQUEST_SCRIPT_WITH_NAME_HASH
- BG_GET_SCRIPT_ID_FROM_NAME_HASH
- GET_HASH_OF_THIS_SCRIPT_NAME
- GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH
- _REQUEST_THREAD_EXIT_FOR_ALL_THREADS_WITH_THIS_NAME
- BG_START_CONTEXT_HASH
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.