Gameplay::getGroundZFor3DCoord2
Client-Side Function
JavaScript Syntax
Similar to Gameplay::getGroundZFor3dCoord but excludes objects that are on the floor.
Required Params
- x: float
- y: float
- z: float
- waterAsGround: boolean
- ignoreWaterLevelCheck: boolean
Return value
- float
Syntax
mp.game.gameplay.getGroundZFor3DCoord2(x, y, z, waterAsGround, ignoreWaterLevelCheck);
Example
const {x, y, z} = mp.players.local.position;
const groundZ = mp.game.gameplay.getGroundZFor3DCoord2(x, y, z, false, false);
mp.console.logInfo(`groundZ is ${groundZ}`);