_START_SCRIPT_BRAIN
Returns threadId
Hash
0x6F62FAE266DCFC81Runtime name
StartScriptBrainNamespaceBRAIN
SideClient
NameCommunity guess
Docs
Since build1207
Signature
int _START_SCRIPT_BRAIN(Entity entity, const char* scriptName, int p2, Any* p3, int p4, BOOL p5);Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | — |
scriptName | const char* | — |
p2 | int | — |
p3 | Any* | — |
p4 | int | — |
p5 | BOOL | — |
Returns int
Description
Returns threadId
Usage
local retval, p3 = StartScriptBrain(entity, scriptName, p2, p4, p5)
-- always works, by hash
local retval, p3 = Citizen.InvokeNative(0x6F62FAE266DCFC81, entity, scriptName, p2, Citizen.PointerValueInt(), p4, p5, Citizen.ResultAsInteger())JavaScript and C#
const [retval, p3] = StartScriptBrain(entity, scriptName, p2, p4, p5);
// by hash
const [retval, p3] = Citizen.invokeNative('0x6F62FAE266DCFC81', entity, scriptName, p2, Citizen.pointerValueInt(), p4, p5, Citizen.returnResultAnyway(), Citizen.resultAsInteger());var p3 = new OutputArgument();
int retval = Function.Call<int>((Hash)0x6F62FAE266DCFC81, entity, scriptName, p2, p3, p4, p5);
// p3.GetResult<int>()- 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.- The name is a community guess and may change. If the named call is missing in your client build, use
InvokeNativewith the hash — it always works.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.