WOULD_ENTITY_BE_OCCLUDED
Returns true if an entity of the given model would be occluded at the given position.
Signature
BOOL WOULD_ENTITY_BE_OCCLUDED(Hash entityModelHash, float x, float y, float z, BOOL p4); // 0x3546FAB293FF2981 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | entityModelHash | Hash |
| 2 | x | float |
| 3 | y | float |
| 4 | z | float |
| 5 | p4 | BOOL |
Facts
| Name | WOULD_ENTITY_BE_OCCLUDED |
|---|---|
| Hash | 0x3546FAB293FF2981 |
| 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(0x3546FAB293FF2981, -- WOULD_ENTITY_BE_OCCLUDED
GetHashKey("a_c_horse_arabian_white"), -- Hash entityModelHash
0.0, -- float x
0.0, -- float y
0.0, -- float z
false -- BOOL p4
)
if result then
-- ...
end// Whole JS numbers are sent as integers: pass floats like 1.5 (or n + 0.0000001), never 1.
const result = Citizen.invokeNative("0x3546FAB293FF2981", // WOULD_ENTITY_BE_OCCLUDED
GetHashKey("a_c_horse_arabian_white"), // Hash entityModelHash
0.0, // float x
0.0, // float y
0.0, // float z
false, // BOOL p4
Citizen.returnResultAnyway()
);
if (result) {
// ...
}bool result = Function.Call<bool>((Hash)0x3546FAB293FF2981, // WOULD_ENTITY_BE_OCCLUDED
(uint)API.GetHashKey("a_c_horse_arabian_white"), // Hash entityModelHash
0.0f, // float x
0.0f, // float y
0.0f, // float z
false // BOOL p4
);Related ENTITY natives
- _GET_ENTITY_CAN_BE_DAMAGED
- _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
- IS_ENTITY_AT_ENTITY
- IS_ENTITY_ATTACHED_TO_ENTITY
- IS_ENTITY_OCCLUDED
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.