DOES_ENTITY_EXIST
Returns true if the entity handle refers to an entity that still exists in the world.
Check it before using a stored handle, since entities can be removed at any time.
Signature
BOOL DOES_ENTITY_EXIST(Entity entity); // 0xD42BD6EB2E0F1677 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | entity | Entity |
Facts
| Name | DOES_ENTITY_EXIST |
|---|---|
| Hash | 0xD42BD6EB2E0F1677 |
| Namespace | |
| Returns | BOOL |
| Game build | 1207 |
Examples
Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.
local result = Citizen.InvokeNative(0xD42BD6EB2E0F1677, -- DOES_ENTITY_EXIST
PlayerPedId() -- Entity entity
)
if result then
-- ...
endconst result = Citizen.invokeNative("0xD42BD6EB2E0F1677", // DOES_ENTITY_EXIST
PlayerPedId(), // Entity entity
Citizen.returnResultAnyway()
);
if (result) {
// ...
}bool result = Function.Call<bool>((Hash)0xD42BD6EB2E0F1677, // DOES_ENTITY_EXIST
API.PlayerPedId() // Entity entity
);Related ENTITY natives
- DOES_ENTITY_BELONG_TO_THIS_SCRIPT
- DOES_ENTITY_HAVE_DRAWABLE
- DOES_ENTITY_HAVE_PHYSICS
- _DOES_THREAD_OWN_THIS_ENTITY
- _GET_LAST_ENTITY_TO_DAMAGE_ENTITY
- ATTACH_ENTITY_TO_ENTITY
- ATTACH_ENTITY_TO_ENTITY_PHYSICALLY
- CLEAR_ENTITY_LAST_DAMAGE_ENTITY
- HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY
- HAS_ENTITY_CLEAR_LOS_TO_ENTITY
- HAS_ENTITY_CLEAR_LOS_TO_ENTITY_IN_FRONT
- IS_ENTITY_A_MISSION_ENTITY
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.