GraphicsClient

getIsPetrolDecalInRange

GET_IS_PETROL_DECAL_IN_RANGE0x2F09F7976C512404

The GTA V native GET_IS_PETROL_DECAL_IN_RANGE of the GRAPHICS namespace, as LS:MP client scripts call it: the global function getIsPetrolDecalInRange, in JavaScript and in Lua.

SignatureJavaScript
getIsPetrolDecalInRange(
  xCoord: number,
  yCoord: number,
  zCoord: number,
  radius: number
): boolean
SignatureLua
getIsPetrolDecalInRange(
  xCoord: number,
  yCoord: number,
  zCoord: number,
  radius: number
): boolean

Usage

JavaScript
const result = getIsPetrolDecalInRange(xCoord, yCoord, zCoord, radius);
Lua
local result = getIsPetrolDecalInRange(xCoord, yCoord, zCoord, radius)

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 = getIsPetrolDecalInRange(coord, radius);
Lua · with vectors
local result = getIsPetrolDecalInRange(coord, radius)

Parameters

ParameterTypeJavaScriptLua
xCoordfloatnumbernumber
yCoordfloatnumbernumber
zCoordfloatnumbernumber
radiusfloatnumbernumber

Returns

BOOL JavaScript boolean, Lua boolean

Reference

Namespace
Graphics GRAPHICS
In the game
BOOL GET_IS_PETROL_DECAL_IN_RANGE(float xCoord, float yCoord, float zCoord, float radius)
Hash
0x2F09F7976C512404

Open in the interactive natives reference