REGISTER_OBJECT_SCRIPT_BRAIN
Registers the script scriptName as a brain for objects of model modelHash, started when the player comes within activationRange.
Signature
void REGISTER_OBJECT_SCRIPT_BRAIN(const char* scriptName, Hash modelHash, int p2, float activationRange, int p4, int p5); // 0x16AF9B4EEAC3B305 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | scriptName | const char* |
| 2 | modelHash | Hash |
| 3 | p2 | int |
| 4 | activationRange | float |
| 5 | p4 | int |
| 6 | p5 | int |
Facts
| Name | REGISTER_OBJECT_SCRIPT_BRAIN |
|---|---|
| Hash | 0x16AF9B4EEAC3B305 |
| Namespace | |
| Returns | void |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
Citizen.InvokeNative(0x16AF9B4EEAC3B305, -- REGISTER_OBJECT_SCRIPT_BRAIN
"text", -- const char* scriptName
GetHashKey("a_c_horse_arabian_white"), -- Hash modelHash
0, -- int p2
0.0, -- float activationRange
0, -- int p4
0 -- int p5
)// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
Citizen.invokeNative("0x16AF9B4EEAC3B305", // REGISTER_OBJECT_SCRIPT_BRAIN
"text", // const char* scriptName
GetHashKey("a_c_horse_arabian_white"), // Hash modelHash
0, // int p2
0.0, // float activationRange
0, // int p4
0 // int p5
);Function.Call((Hash)0x16AF9B4EEAC3B305, // REGISTER_OBJECT_SCRIPT_BRAIN
"text", // const char* scriptName
(uint)API.GetHashKey("a_c_horse_arabian_white"), // Hash modelHash
0, // int p2
0.0f, // float activationRange
0, // int p4
0 // int p5
);Related BRAIN natives
- _GET_SCRIPT_BRAIN_ENTITY
- _REMOVE_SCRIPT_BRAIN_ENTITY
- _START_PRELOADED_SCRIPT_BRAIN
- _START_SCRIPT_BRAIN
- DISABLE_SCRIPT_BRAIN_SET
- ENABLE_SCRIPT_BRAIN_SET
- REACTIVATE_ALL_OBJECT_BRAINS_THAT_ARE_WAITING_TILL_OUT_OF_RANGE
- REACTIVATE_NAMED_OBJECT_BRAINS_WAITING_TILL_OUT_OF_RANGE
- _0x4AA5EA1EDFB25786
- _0xA6AC35DB4A7957A8
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.