The Lab
BRAIN native

REGISTER_OBJECT_SCRIPT_BRAIN

returns void6 paramsbuild 1207

Registers the script scriptName as a brain for objects of model modelHash, started when the player comes within activationRange.

Signature

C
void REGISTER_OBJECT_SCRIPT_BRAIN(const char* scriptName, Hash modelHash, int p2, float activationRange, int p4, int p5); // 0x16AF9B4EEAC3B305 b1207

Parameters

#NameType
1scriptNameconst char*
2modelHashHash
3p2int
4activationRangefloat
5p4int
6p5int

Facts

Facts about REGISTER_OBJECT_SCRIPT_BRAIN
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.

Lua
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
)
JavaScript
// 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
);
C#
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
);
All BRAIN natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.