NetworkAddEntityToSynchronisedScene
DocsNetworkAddEntityToSynchronisedScene(entity, netScene, animDict, animName, blendIn, blendOut, flag)Description
Adds an entity to a network synchronised scene.
Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | Entity handle to add to the scene. |
netScene | int | Which network scene to add this entity to (Returned by [`NETWORK_CREATE_SYNCHRONISED_SCENE`](#\_0x7CD6BC4C2BBDD526)) |
animDict | char* | Animation dictionary to play on this entity. |
animName | char* | Animation clip from the dictionary to play on this entity. |
blendIn | float | Blend in speed of the animation. Default is `8.0`. |
blendOut | float | Blend out speed of the animation. Default is `-8.0`. |
flag | int | Synchronized scene flags. See [`NETWORK_ADD_PED_TO_SYNCHRONISED_SCENE`](#\_0x742A637471BCECD9) for more info. |
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
voidThis native does not return a value.