SetEntityNoCollisionEntity
DocsSetEntityNoCollisionEntity(entity1, entity2, thisFrameOnly)Description
Calling this function disables collision between two entities.
The importance of the order for entity1 and entity2 is unclear.
The third parameter, thisFrame, decides whether the collision is to be disabled until it is turned back on, or if it's just this frame.
Parameters
| Name | Type | Description |
|---|---|---|
entity1 | Entity | — |
entity2 | Entity | — |
thisFrameOnly | BOOL | — |
Quick Snippet: Get Entityentity1entity2
entity1entity2Use 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.