wouldEntityBeOccluded
WOULD_ENTITY_BE_OCCLUDED0xEE5D2A122E09EC42The GTA V native WOULD_ENTITY_BE_OCCLUDED of the ENTITY namespace, as LS:MP client scripts call it: the global function wouldEntityBeOccluded, in JavaScript and in Lua.
wouldEntityBeOccluded(
entityModelHash: Hash,
x: number,
y: number,
z: number,
p4: boolean
): booleanwouldEntityBeOccluded(
entityModelHash: Hash,
x: number,
y: number,
z: number,
p4: boolean
): booleanUsage
JavaScript
const result = wouldEntityBeOccluded(entityModelHash, x, y, z, p4);Lua
local result = wouldEntityBeOccluded(entityModelHash, x, y, z, p4)Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.
JavaScript · with vectors
const result = wouldEntityBeOccluded(entityModelHash, pos, p4);Lua · with vectors
local result = wouldEntityBeOccluded(entityModelHash, pos, p4)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
entityModelHash | Hash | number | integer |
x | float | number | number |
y | float | number | number |
z | float | number | number |
p4 | BOOL | boolean | boolean |
Returns
BOOL JavaScript boolean, Lua booleanReference
- Namespace
- Entity ENTITY
- In the game
BOOL WOULD_ENTITY_BE_OCCLUDED(Hash entityModelHash, float x, float y, float z, BOOL p4)- Hash
0xEE5D2A122E09EC42