RedM Natives

_GET_CLOSEST_FIRE_POS_IN_VOLUME

Hash0x559FC1D310813031
Runtime nameGetClosestFirePosInVolume
NamespaceFIRE
SideClient
NameCommunity guess
Docs
Since build1232

Signature

BOOL _GET_CLOSEST_FIRE_POS_IN_VOLUME(Vector3* outPosition, float posX, float posY, float posZ, float rotX, float rotY, float rotZ, float scaleX, float scaleY, float scaleZ);

Parameters

NameTypeDescription
outPositionVector3*—
posXfloat—
posYfloat—
posZfloat—
rotXfloat—
rotYfloat—
rotZfloat—
scaleXfloat—
scaleYfloat—
scaleZfloat—

Returns BOOL

Usage

Lua
local retval, outPosition = GetClosestFirePosInVolume(posX, posY, posZ, rotX, rotY, rotZ, scaleX, scaleY, scaleZ)

-- always works, by hash
local retval, outPosition = Citizen.InvokeNative(0x559FC1D310813031, Citizen.PointerValueVector(), posX, posY, posZ, rotX, rotY, rotZ, scaleX, scaleY, scaleZ, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, outPosition] = GetClosestFirePosInVolume(posX, posY, posZ, rotX, rotY, rotZ, scaleX, scaleY, scaleZ);

// by hash
const [retval, outPosition] = Citizen.invokeNative('0x559FC1D310813031', Citizen.pointerValueVector(), posX + 0.0000001, posY + 0.0000001, posZ + 0.0000001, rotX + 0.0000001, rotY + 0.0000001, rotZ + 0.0000001, scaleX + 0.0000001, scaleY + 0.0000001, scaleZ + 0.0000001, Citizen.returnResultAnyway());
C#
var outPosition = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x559FC1D310813031, outPosition, posX, posY, posZ, rotX, rotY, rotZ, scaleX, scaleY, scaleZ);
// outPosition.GetResult<Vector3>()
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to 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.
  • The name is a community guess and may change. If the named call is missing in your client build, use InvokeNative with the hash — it always works.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.