PlaySynchronizedEntityAnim
Docslocal retval = PlaySynchronizedEntityAnim(entity, syncedScene, animation, propName, p4, p5, p6, p7)Description
p4 and p7 are usually 1000.0f.
Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | — |
syncedScene | int | — |
animation | char* | — |
propName | char* | — |
p4 | float | — |
p5 | float | — |
p6 | Any | — |
p7 | float | — |
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).