NetworkAllowRemoteAttachmentModification
DocsNetworkAllowRemoteAttachmentModification(entity, toggle)Description
Allows scripts to use attachment commands on entities (eg. <code>ATTACH_ENTITY_TO_ENTITY</code>) that are not controlled by the client.
Note: This is only local and does not affect entities on other machines. This is used by the ferris wheel script to sync players on carts.
Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | Entity handle to allow remote attachment for. |
toggle | BOOL | true/false. |
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.