GET_CLOSEST_FIRE_POS
Hash
0xB646FB657F448261Runtime name
GetClosestFirePosNamespaceFIRE
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x352A9F6BCF90081FSignature
BOOL GET_CLOSEST_FIRE_POS(Vector3* outPosition, float x, float y, float z);Parameters
| Name | Type | Description |
|---|---|---|
outPosition | Vector3* | — |
x | float | — |
y | float | — |
z | float | — |
Returns BOOL
Usage
local retval, outPosition = GetClosestFirePos(x, y, z)
-- always works, by hash
local retval, outPosition = Citizen.InvokeNative(0xB646FB657F448261, Citizen.PointerValueVector(), x, y, z, Citizen.ReturnResultAnyway())JavaScript and C#
const [retval, outPosition] = GetClosestFirePos(x, y, z);
// by hash
const [retval, outPosition] = Citizen.invokeNative('0xB646FB657F448261', Citizen.pointerValueVector(), x + 0.0000001, y + 0.0000001, z + 0.0000001, Citizen.returnResultAnyway());var outPosition = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0xB646FB657F448261, outPosition, x, y, z);
// outPosition.GetResult<Vector3>()- 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. - Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.