Script brainsClientBlocked

addScriptToRandomPed

ADD_SCRIPT_TO_RANDOM_PED0x4EE5367468A65CCC

The GTA V native ADD_SCRIPT_TO_RANDOM_PED of the BRAIN namespace, as LS:MP client scripts call it: the global function addScriptToRandomPed, in JavaScript and in Lua.

SignatureJavaScript
addScriptToRandomPed(name: string, model: Hash, p2: number, p3: number): void
SignatureLua
addScriptToRandomPed(name: string, model: Hash, p2: number, p3: number)
✕
Blocked for scripts: Game script threads

Resources do not start, stop or adopt the game's own compiled scripts. Your code runs as an LS:MP resource.

Calling it raises disabled by LSMP script policy, which try / catch (JavaScript) or pcall (Lua) can intercept. Nothing reaches the game. See Blocked natives.

Reference

Namespace
Script brains BRAIN
In the game
void ADD_SCRIPT_TO_RANDOM_PED(const char* name, Hash model, float p2, float p3)
Hash
0x4EE5367468A65CCC

Open in the interactive natives reference