_START_SCRIPT_BRAIN
Based on its name and signature, here is our best reading:
Appears to start the brain script scriptName on entity and return a thread id. Several parameters are undocumented.
Signature
int _START_SCRIPT_BRAIN(Entity entity, const char* scriptName, int p2, Any* p3, int p4, BOOL p5); // 0x6F62FAE266DCFC81 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | entity | Entity |
| 2 | scriptName | const char* |
| 3 | p2 | int |
| 4 | p3 | Any* (out pointer) |
| 5 | p4 | int |
| 6 | p5 | BOOL |
Facts
| Name | _START_SCRIPT_BRAIN |
|---|---|
| Hash | 0x6F62FAE266DCFC81 |
| 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, p3 = Citizen.InvokeNative(0x6F62FAE266DCFC81, -- _START_SCRIPT_BRAIN
PlayerPedId(), -- Entity entity
"text", -- const char* scriptName
0, -- int p2
Citizen.PointerValueInt(), -- Any* p3
0, -- int p4
false, -- BOOL p5
Citizen.ResultAsInteger()
)
print(result, p3)const [result, p3] = Citizen.invokeNative("0x6F62FAE266DCFC81", // _START_SCRIPT_BRAIN
PlayerPedId(), // Entity entity
"text", // const char* scriptName
0, // int p2
Citizen.pointerValueInt(), // Any* p3
0, // int p4
false, // BOOL p5
Citizen.resultAsInteger()
);
console.log(result, p3)var p3Arg = new OutputArgument();
int result = Function.Call<int>((Hash)0x6F62FAE266DCFC81, // _START_SCRIPT_BRAIN
API.PlayerPedId(), // Entity entity
"text", // const char* scriptName
0, // int p2
p3Arg, // Any* p3
0, // int p4
false // BOOL p5
);
int p3 = p3Arg.GetResult<int>();Related BRAIN natives
- _START_PRELOADED_SCRIPT_BRAIN
- _GET_SCRIPT_BRAIN_ENTITY
- _REMOVE_SCRIPT_BRAIN_ENTITY
- DISABLE_SCRIPT_BRAIN_SET
- ENABLE_SCRIPT_BRAIN_SET
- REGISTER_OBJECT_SCRIPT_BRAIN
- _0x4AA5EA1EDFB25786
- _0xA6AC35DB4A7957A8
- REACTIVATE_ALL_OBJECT_BRAINS_THAT_ARE_WAITING_TILL_OUT_OF_RANGE
- REACTIVATE_NAMED_OBJECT_BRAINS_WAITING_TILL_OUT_OF_RANGE
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.