IS_ENTITY_AT_COORD
Checks if entity is within x/y/zSize distance of x/y/z.
Hash
0x5E58342602E94718Runtime name
IsEntityAtCoordNamespaceENTITY
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x20B60995556D004FSignature
BOOL IS_ENTITY_AT_COORD(Entity entity, float xPos, float yPos, float zPos, float xSize, float ySize, float zSize, BOOL p7, BOOL p8, int p9);Parameters
| Name | Type | Description |
|---|---|---|
entity | Entity | — |
xPos | float | — |
yPos | float | — |
zPos | float | — |
xSize | float | — |
ySize | float | — |
zSize | float | — |
p7 | BOOL | — |
p8 | BOOL | — |
p9 | int | — |
Returns BOOL
Description
Checks if entity is within x/y/zSize distance of x/y/z.
Last three are unknown ints, almost always p7 = 0, p8 = 1, p9 = 0
Usage
local retval = IsEntityAtCoord(entity, xPos, yPos, zPos, xSize, ySize, zSize, p7, p8, p9)
-- always works, by hash
local retval = Citizen.InvokeNative(0x5E58342602E94718, entity, xPos, yPos, zPos, xSize, ySize, zSize, p7, p8, p9, Citizen.ReturnResultAnyway())JavaScript and C#
const retval = IsEntityAtCoord(entity, xPos, yPos, zPos, xSize, ySize, zSize, p7, p8, p9);
// by hash
const retval = Citizen.invokeNative('0x5E58342602E94718', entity, xPos + 0.0000001, yPos + 0.0000001, zPos + 0.0000001, xSize + 0.0000001, ySize + 0.0000001, zSize + 0.0000001, p7, p8, p9, Citizen.returnResultAnyway());bool retval = Function.Call<bool>((Hash)0x5E58342602E94718, entity, xPos, yPos, zPos, xSize, ySize, zSize, p7, p8, p9);- 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.