RedM Natives

TASK_MOVE_NETWORK_BY_NAME_WITH_INIT_PARAMS

Hash0x139805C2A67C4795
Runtime nameTaskMoveNetworkByNameWithInitParams
NamespaceTASK
SideClient
NameOfficial
Docs
Since build1207

Signature

void TASK_MOVE_NETWORK_BY_NAME_WITH_INIT_PARAMS(Ped ped, const char* moveNetworkDefName, Any* taskData, float p3, BOOL p4, const char* animDict, int flags);

Parameters

NameTypeDescription
pedPed—
moveNetworkDefNameconst char*—
taskDataAny*—
p3float—
p4BOOL—
animDictconst char*—
flagsint—

Returns void

Usage

Lua
local taskData = TaskMoveNetworkByNameWithInitParams(ped, moveNetworkDefName, p3, p4, animDict, flags)

-- always works, by hash
local taskData = Citizen.InvokeNative(0x139805C2A67C4795, ped, moveNetworkDefName, Citizen.PointerValueInt(), p3, p4, animDict, flags)
JavaScript and C#
JavaScript
const taskData = TaskMoveNetworkByNameWithInitParams(ped, moveNetworkDefName, p3, p4, animDict, flags);

// by hash
const taskData = Citizen.invokeNative('0x139805C2A67C4795', ped, moveNetworkDefName, Citizen.pointerValueInt(), p3 + 0.0000001, p4, animDict, flags);
C#
var taskData = new OutputArgument();
Function.Call((Hash)0x139805C2A67C4795, ped, moveNetworkDefName, taskData, p3, p4, animDict, flags);
// taskData.GetResult<int>()
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.
  • 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.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.