TaskPlayAnimAdvanced
DocsTaskPlayAnimAdvanced(ped, animDictionary, animationName, posX, posY, posZ, rotX, rotY, rotZ, blendInSpeed, blendOutSpeed, duration, flag, animTime, p14, p15)Description
Similar in functionality to <code>TASK_PLAY_ANIM</code>, except the position and rotation parameters let you specify the initial position and rotation of the task. The ped is teleported to the position specified.
Parameters
| Name | Type | Description |
|---|---|---|
ped | Ped | The ped you want to play the animation |
animDictionary | char* | The animation dictionary |
animationName | char* | The animation name |
posX | float | Initial X position of the task |
posY | float | Initial Y position of the task |
posZ | float | Initial Z position of the task |
rotX | float | Initial X rotation of the task |
rotY | float | Initial Y rotation of the task |
rotZ | float | Initial Z rotation of the task |
blendInSpeed | float | The speed at which the animation blends in. Lower is slower and higher is faster, 1.0 is normal, 8.0 is basically instant |
blendOutSpeed | float | The speed at which the animation blends out. Lower is slower and higher is faster, 1.0 is normal, 8.0 is basically instant |
duration | int | The duration of the animation in milliseconds. -1 will play the animation until canceled |
flag | Any | See [`TASK_PLAY_ANIM`](#\_0xEA47FE3719165B94) |
animTime | float | Value between 0.0 and 1.0, lets you start an animation from the given point |
p14 | Any | — |
p15 | Any | — |
Quick Snippet: Get CoordinatesposXposYposZrotX
posXposYposZrotXAdd this command to your client script to retrieve precise locations in-game.
-- Add this to your client.lua. Type /pos in-game to copy coords.
RegisterCommand('pos', function()
local ped = PlayerPedId()
local coords = GetEntityCoords(ped)
local heading = GetEntityHeading(ped)
local output = string.format("vector4(%.2f, %.2f, %.2f, %.2f)", coords.x, coords.y, coords.z, heading)
print(output)
TriggerEvent('chat:addMessage', { args = { '^4[COORD]^0', output } })
end)Quick Snippet: Get Ped Handleped
pedUse this to get the player ped handle for this native.
-- Get the player's ped handle (client-side)
local ped = PlayerPedId()
print("Ped handle: " .. ped)
-- For a specific player's ped (server-side):
-- local targetPed = GetPlayerPed(source)Ped Models

mp_m_freemode_01
player_zero
ig_agatha
s_m_y_cop_01
s_m_m_gaffer_01
g_m_m_armboss_01
a_c_boar
a_m_m_bevhills_01Returns
voidThis native does not return a value.