IS_ENTITY_AT_ENTITY
Checks if entity1 is within the box defined by x/y/zSize of entity2.
Hash
0xC057F02B837A27F6Runtime name
IsEntityAtEntityNamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x751B70C3D034E187Signature
BOOL IS_ENTITY_AT_ENTITY(Entity entity1, Entity entity2, float xSize, float ySize, float zSize, BOOL p5, BOOL p6, int p7);Parameters
| Name | Type | Description |
|---|---|---|
entity1 | Entity | — |
entity2 | Entity | — |
xSize | float | — |
ySize | float | — |
zSize | float | — |
p5 | BOOL | — |
p6 | BOOL | — |
p7 | int | — |
Returns BOOL
Description
Checks if entity1 is within the box defined by x/y/zSize of entity2.
Last three parameters are almost always p5 = 0, p6 = 1, p7 = 0
Usage
local retval = IsEntityAtEntity(entity1, entity2, xSize, ySize, zSize, p5, p6, p7)
-- always works, by hash
local retval = Citizen.InvokeNative(0xC057F02B837A27F6, entity1, entity2, xSize, ySize, zSize, p5, p6, p7, Citizen.ReturnResultAnyway())JavaScript and C#
const retval = IsEntityAtEntity(entity1, entity2, xSize, ySize, zSize, p5, p6, p7);
// by hash
const retval = Citizen.invokeNative('0xC057F02B837A27F6', entity1, entity2, xSize + 0.0000001, ySize + 0.0000001, zSize + 0.0000001, p5, p6, p7, Citizen.returnResultAnyway());bool retval = Function.Call<bool>((Hash)0xC057F02B837A27F6, entity1, entity2, xSize, ySize, zSize, p5, p6, p7);- Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.