PlayEntityAnim
Docslocal retval = PlayEntityAnim(entity, animName, animDict, p3, loop, stayInAnim, p6, delta, bitset)Description
delta and bitset are guessed fields. They are based on the fact that most of the calls have 0 or nil field types passed in.
The only time bitset has a value is 0x4000 and the only time delta has a value is during stealth with usually <1.0f values.
Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | — |
animName | char* | — |
animDict | char* | — |
p3 | float | — |
loop | BOOL | — |
stayInAnim | BOOL | — |
p6 | BOOL | — |
delta | float | — |
bitset | Any | — |
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).