getGroundZExcludingObjectsFor3dCoord
GET_GROUND_Z_EXCLUDING_OBJECTS_FOR_3D_COORD0x9E82F0F362881B29The GTA V native GET_GROUND_Z_EXCLUDING_OBJECTS_FOR_3D_COORD of the MISC namespace, as LS:MP client scripts call it: the global function getGroundZExcludingObjectsFor3dCoord, in JavaScript and in Lua.
getGroundZExcludingObjectsFor3dCoord(
x: number,
y: number,
z: number,
p4: boolean,
p5: boolean
): [ok: boolean, groundZ: number]getGroundZExcludingObjectsFor3dCoord(
x: number,
y: number,
z: number,
p4: boolean,
p5: boolean
): boolean, numberUsage
JavaScript
const [ok, groundZ] = getGroundZExcludingObjectsFor3dCoord(x, y, z, p4, p5);Lua
local ok, groundZ = getGroundZExcludingObjectsFor3dCoord(x, y, z, p4, p5)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 [ok, groundZ] = getGroundZExcludingObjectsFor3dCoord(pos, p4, p5);Lua · with vectors
local ok, groundZ = getGroundZExcludingObjectsFor3dCoord(pos, p4, p5)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
x | float | number | number |
y | float | number | number |
z | float | number | number |
p4 | BOOL | boolean | boolean |
p5 | BOOL | boolean | boolean |
Returns
2 values, in this order: an array in JavaScript, multiple return values in Lua.
| # | Value | Type | JavaScript | Lua | Description |
|---|---|---|---|---|---|
| 1 | ok | BOOL | boolean | boolean | The native’s own return value. |
| 2 | groundZ | float | number | number | output |
Reference
- Namespace
- Misc MISC
- In the game
BOOL GET_GROUND_Z_EXCLUDING_OBJECTS_FOR_3D_COORD(float x, float y, float z, float* groundZ, BOOL p4, BOOL p5)- Hash
0x9E82F0F362881B29- Introduced
- Game build 505 legacy numbering
- Formerly
_GET_GROUND_Z_FOR_3D_COORD_2