getClosestFirePos
GET_CLOSEST_FIRE_POS0x352A9F6BCF90081FThe GTA V native GET_CLOSEST_FIRE_POS of the FIRE namespace, as LS:MP client scripts call it: the global function getClosestFirePos, in JavaScript and in Lua.
getClosestFirePos(x: number, y: number, z: number): [
ok: boolean,
outPosition: { x: number, y: number, z: number }
]getClosestFirePos(x: number, y: number, z: number): boolean, Vector3Usage
JavaScript
const [ok, outPosition] = getClosestFirePos(x, y, z);Lua
local ok, outPosition = getClosestFirePos(x, y, z)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, outPosition] = getClosestFirePos(pos);Lua · with vectors
local ok, outPosition = getClosestFirePos(pos)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
x | float | number | number |
y | float | number | number |
z | float | number | number |
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 | outPosition | Vector3 | { x: number, y: number, z: number } | Vector3 | output |
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Returns TRUE if it found something. FALSE if not.
Reference
- Namespace
- Fire FIRE
- In the game
BOOL GET_CLOSEST_FIRE_POS(Vector3* outPosition, float x, float y, float z)- Hash
0x352A9F6BCF90081F