IsEntityPlayingAnim
Docslocal retval = IsEntityPlayingAnim(entity, animDict, animName, taskFlag)Description
See also <code>IS_SCRIPTED_SCENARIO_PED_USING_CONDITIONAL_ANIM</code>
Taken from ENTITY::IS_ENTITY_PLAYING_ANIM(PLAYER::PLAYER_PED_ID(), "creatures@shark@move", "attack_player", 3)
p4 is always 3 in the scripts.
taskFlag:
2 - Check synchronized scene
Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | — |
animDict | char* | — |
animName | char* | — |
taskFlag | int | — |
Quick Snippet: Get Entityentity
entityUse this to obtain an entity handle from the player's aim or crosshair.
-- Get the entity the player is aiming at
local ped = PlayerPedId()
local hit, entity = GetEntityPlayerIsFreeAimingAt(PlayerId())
if hit and entity ~= 0 then
print("Entity: " .. entity)
print("Model: " .. GetEntityModel(entity))
print("Type: " .. GetEntityType(entity)) -- 1=Ped, 2=Vehicle, 3=Object
endReturns
BOOLReturns TRUE (1) or FALSE (0).