ReleaseScriptGuidFromEntity
DocsReleaseScriptGuidFromEntity(entity)Description
Invalidates the entity handle passed by removing the fwScriptGuid from the entity. This should be used when receiving an
ambient entity from shape testing natives, but can also be used for other natives returning an 'irrelevant' entity handle.
Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | The entity handle to invalidate. |
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.