SetEntityRemoteSyncedScenesAllowed
DocsSetEntityRemoteSyncedScenesAllowed(entity, allow)Description
Enables or disables the owner check for the specified entity in network-synchronized scenes. When set to false, the entity cannot participate in synced scenes initiated by clients that do not own the entity.
By default, this is false for all entities, meaning only the entity's owner can include it in networked synchronized scenes.
Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | The entity to set the flag for. |
allow | bool | Whether to allow remote synced scenes for the entity. |
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.