TASK_MOVE_NETWORK_BY_NAME_WITH_INIT_PARAMS
Hash
0x139805C2A67C4795Runtime name
TaskMoveNetworkByNameWithInitParamsNamespaceTASK
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
| Name | Type | Description |
|---|---|---|
ped | Ped | — |
moveNetworkDefName | const char* | — |
taskData | Any* | — |
p3 | float | — |
p4 | BOOL | — |
animDict | const char* | — |
flags | int | — |
Returns void
Usage
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#
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);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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to 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
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.