RedM Natives

TASK_MOVE_NETWORK_ADVANCED_BY_NAME_WITH_INIT_PARAMS

Hash0x7B6A04F98BBAFB2C
Runtime nameTaskMoveNetworkAdvancedByNameWithInitParams
NamespaceTASK
SideClient
NameOfficial
Docs
Since build1207

Signature

void TASK_MOVE_NETWORK_ADVANCED_BY_NAME_WITH_INIT_PARAMS(Ped ped, const char* moveNetworkDefName, Any* taskData, float xPos, float yPos, float zPos, float xRot, float yRot, float zRot, int p9, float p10, int p11, int p12, int flag, int p14);

Parameters

NameTypeDescription
pedPed—
moveNetworkDefNameconst char*—
taskDataAny*—
xPosfloat—
yPosfloat—
zPosfloat—
xRotfloat—
yRotfloat—
zRotfloat—
p9int—
p10float—
p11int—
p12int—
flagint—
p14int—

Returns void

Usage

Lua
local taskData = TaskMoveNetworkAdvancedByNameWithInitParams(ped, moveNetworkDefName, xPos, yPos, zPos, xRot, yRot, zRot, p9, p10, p11, p12, flag, p14)

-- always works, by hash
local taskData = Citizen.InvokeNative(0x7B6A04F98BBAFB2C, ped, moveNetworkDefName, Citizen.PointerValueInt(), xPos, yPos, zPos, xRot, yRot, zRot, p9, p10, p11, p12, flag, p14)
JavaScript and C#
JavaScript
const taskData = TaskMoveNetworkAdvancedByNameWithInitParams(ped, moveNetworkDefName, xPos, yPos, zPos, xRot, yRot, zRot, p9, p10, p11, p12, flag, p14);

// by hash
const taskData = Citizen.invokeNative('0x7B6A04F98BBAFB2C', ped, moveNetworkDefName, Citizen.pointerValueInt(), xPos + 0.0000001, yPos + 0.0000001, zPos + 0.0000001, xRot + 0.0000001, yRot + 0.0000001, zRot + 0.0000001, p9, p10 + 0.0000001, p11, p12, flag, p14);
C#
var taskData = new OutputArgument();
Function.Call((Hash)0x7B6A04F98BBAFB2C, ped, moveNetworkDefName, taskData, xPos, yPos, zPos, xRot, yRot, zRot, p9, p10, p11, p12, flag, p14);
// 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.

Enums and flags

Sources

alloc8or RDR3 NativeDB

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